-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore dynamic sub-decks during export #43
- Loading branch information
Showing
4 changed files
with
31 additions
and
3 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
Empty file.
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from expects import expect, be | ||
from mamba import description, it | ||
from unittest.mock import MagicMock | ||
|
||
from crowd_anki.representation import deck_initializer | ||
|
||
DYNAMIC_DECK = {'dyn': True} | ||
|
||
TEST_DECK = "test deck" | ||
|
||
with description("Initializer from deck") as self: | ||
with it("should return None when trying to export dynamic deck"): | ||
collection = MagicMock() | ||
|
||
collection.decks.byName.return_value = DYNAMIC_DECK | ||
|
||
expect(deck_initializer.from_collection(collection, TEST_DECK)).to(be(None)) |