run_part2_tests module¶
Autograder tests for Part 2.
Run this script (python3 run_part2_tests.py
) from the same directory as
your client.py
file. This will run all of the functionality tests for
Part 2 of the project.
-
class
run_part2_tests.
StudentTester
(theclass)¶ Bases:
object
-
run_test
(t, Server=<class 'servers.StorageServer'>, Crypto=<class 'crypto.Crypto'>, Pks=<class 'servers.PublicKeyServer'>)¶
-
-
run_part2_tests.
run_part2_tests
()¶ Runs all part 2 functionality tests.
-
run_part2_tests.
t01_SimpleSharing
(C, pks, crypto, server)¶ Checks that sharing works in the simplest case of sharing one file.
-
run_part2_tests.
t02_SimpleTransitiveSharing
(C, pks, crypto, server)¶ Checks that sharing a file can be done multiple times and is transitive.
-
run_part2_tests.
t03_SharingIsPassByReference
(C, pks, crypto, server)¶ Verifies that updates to a file are sent to all other users who have that file.
-
run_part2_tests.
t04_SharingIsPassByReference2
(C, pks, crypto, server)¶ Verifies that updates to a file are sent to all other users who have that file.
-
run_part2_tests.
t05_EfficientPutChangedData
(C, pks, crypto, server)¶ Verifies that when two users have access to a file they keep their state current.
Verifies that when two users have access to a file they keep their state current.
Checks that after a user has been revoked from a file, they can receive it again.
-
run_part2_tests.
t08_SimpleSubtreeRevoke
(C, pks, crypto, server)¶ Simple verification that revocation also revokes all grandchildren of a file.
-
run_part2_tests.
t09_MultiLevelSharingRevocation
(C, pks, crypto, server)¶ Creates many users and shares the file in a random tree structure, revoking one child, and verifies that updates are correctly reflected.