-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed a few issues with database models and added a small test
- Loading branch information
Showing
3 changed files
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
from unittest import TestCase, main | ||
|
||
from utility import get_name_in_genitive | ||
from utility_standalone import decrypt_id, encrypt_id | ||
|
||
|
||
class UtilityEncryptionTest(TestCase): | ||
|
||
class UtilityTest(TestCase): | ||
def test_split(self): | ||
for inputnumber in range(-1000, 1000): | ||
result = decrypt_id(encrypt_id(inputnumber)) | ||
self.assertEqual(int(result), inputnumber) | ||
|
||
def test_name_lookup(self): | ||
assert (get_name_in_genitive("Triin") == "Triinu") | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
main() |