Skip to content

Commit

Permalink
Closes Bears-R-Us#2640 - Convert security_test.py to new test frame…
Browse files Browse the repository at this point in the history
…work (Bears-R-Us#2641)

* Adding security tests to new framework.

* Formatting

* Update PROTO_tests/tests/security_test.py

Co-authored-by: pierce <48131946+pierce314159@users.noreply.github.com>

---------

Co-authored-by: pierce <48131946+pierce314159@users.noreply.github.com>
  • Loading branch information
Ethan-DeBandi99 and stress-tess authored Aug 7, 2023
1 parent 24556be commit 5eb7b5f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions PROTO_tests/tests/security_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import platform
from os.path import expanduser

from arkouda import security


class TestSecurity:
def test_generate_token(self):
assert 32 == len(security.generate_token(32))
assert 16 == len(security.generate_token(16))

def test_get_home(self):
assert expanduser("~") == security.get_home_directory()

def test_get_username(self):
assert security.get_username() in security.username_tokenizer[platform.system()](
security.get_home_directory()
)

def test_get_arkouda_directory(self):
ak_directory = security.get_arkouda_client_directory()
assert f"{security.get_home_directory()}/.arkouda" == str(ak_directory)

0 comments on commit 5eb7b5f

Please sign in to comment.