-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
681e8f1
commit bfa9f9c
Showing
2 changed files
with
17 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import unittest | ||
|
||
from securedrop_client import state | ||
from securedrop_client import state as local | ||
|
||
|
||
class TestDebugging(unittest.TestCase): | ||
def test_file_identifiers_are_distinguishable(self): | ||
id = state.FileId("some file ID") | ||
assert "downloaded" not in id.__repr__() | ||
def test_files_can_be_downloaded(self): | ||
file = local.File("some opaque identifier") | ||
assert file.id == local.FileId("some opaque identifier") | ||
assert not file.is_downloaded | ||
|
||
id = state.DownloadedFileId("another file ID") | ||
assert "downloaded" in id.__repr__() | ||
file.is_downloaded = True | ||
assert file.is_downloaded |
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