Skip to content

Commit

Permalink
rc3
Browse files Browse the repository at this point in the history
  • Loading branch information
jossmoff committed Oct 22, 2023
1 parent 214570f commit 9ec2f3f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bookshelf/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.2"
__version__ = "0.0.3"
2 changes: 1 addition & 1 deletion bookshelf/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self):
pass

def save_story(self, story: Story) -> None:
if self.story_exists(story.name):
if not self.story_exists(story.name):
os.makedirs(self.BOOKSHELF_TASK_DIR)
filename = os.path.join(self.BOOKSHELF_TASK_DIR, f'{story.name}.json')
with open(filename, 'w') as file:
Expand Down
2 changes: 1 addition & 1 deletion test/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_load_nonexistent_story(bookshelf_storage, mock_home):


def test_save_non_existing_story(bookshelf_storage, mock_home):
os.path.exists = MagicMock(return_value=True)
os.path.exists = MagicMock(return_value=False)
os.makedirs = MagicMock()
json.dump = MagicMock()

Expand Down

0 comments on commit 9ec2f3f

Please sign in to comment.