Skip to content

Commit

Permalink
removed bug with get date in metadata module
Browse files Browse the repository at this point in the history
  • Loading branch information
vgoehler committed Mar 4, 2020
1 parent 38f5208 commit a4e6c4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/python_eulerian_video_magnification/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __getitem__(self, item):

def save_meta_data(self):
"""stores the meta data dictionary as a json"""
self.__data['date'] = self.get_date()
self.__data['date'] = MetaData.get_date()
with open(self.__data['meta_target'], 'w') as fp:
json.dump(self.__data, fp=fp, sort_keys=True, indent=4, separators=(',', ': '))

Expand Down
3 changes: 2 additions & 1 deletion tests/test_video_motion_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
sample = os.path.join(os.getcwd(), 'tests', 'videos', 'guitar1sec.mp4')


def test_process_video(tmp_path, capsys):
def test_process_video(tmp_path, capsys, monkeypatch):
monkeypatch.setattr(MetaData, "get_date", lambda: "2020-01-01-16:16:16")
main([sample, '-o', str(tmp_path)])

captured = capsys.readouterr()
Expand Down

0 comments on commit a4e6c4c

Please sign in to comment.