-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
back endPythonPythonstructureThis will make something more clear and less prone to programming errorsThis will make something more clear and less prone to programming errors
Description
Tests should be made for the Account class in file_server/web/account.py. The variable Account.directory can be changed in tests safely to run the methods in a test directory. This shouldn't need to be changed back, but should be set before any test with the Account class.
To get current directory for a python file:
import os, inspect
curr_path = os.path.split(inspect.stack()[0][1])[0]
The following tests should be included
- Creating the first account without an auth
- Generate an auth and confirm it is valid
- Create an account with a generated auth
- Create a session with an account and confirm session is valid, end the session and confirm session isn't valid, create a session with the same account and confirm the session is valid. Repeat with a different account used for the second session
- Create an account, then load the account into another variable and confirm the two are equal with
==
An example test can be found at file_server/file/__test__/test_snapshot.py
Test naming conventions: https://pytest.readthedocs.io/en/reorganize-docs/new-docs/user/naming_conventions.html
Metadata
Metadata
Assignees
Labels
back endPythonPythonstructureThis will make something more clear and less prone to programming errorsThis will make something more clear and less prone to programming errors