mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-25 14:37:59 +01:00
Fix deprecation warnings from Arrow
This commit is contained in:
parent
ea8dcbca7d
commit
9cc8ebb01b
2 changed files with 9 additions and 9 deletions
|
@ -50,7 +50,7 @@ class DateNormalizer(JayWalker):
|
||||||
"""
|
"""
|
||||||
parsed = arrow.get(value or 0)
|
parsed = arrow.get(value or 0)
|
||||||
|
|
||||||
if parsed.timestamp == 0:
|
if parsed.int_timestamp == 0:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return parsed.to('utc').isoformat()
|
return parsed.to('utc').isoformat()
|
||||||
|
|
|
@ -138,7 +138,7 @@ class TestStoryDateMapper:
|
||||||
|
|
||||||
story = story.merge(meta=meta)
|
story = story.merge(meta=meta)
|
||||||
|
|
||||||
assert mapper(story).timestamp == 5
|
assert mapper(story).int_timestamp == 5
|
||||||
|
|
||||||
def test_meta_with_none_chapters(self, mapper, story):
|
def test_meta_with_none_chapters(self, mapper, story):
|
||||||
"""
|
"""
|
||||||
|
@ -151,7 +151,7 @@ class TestStoryDateMapper:
|
||||||
|
|
||||||
story = story.merge(meta=meta)
|
story = story.merge(meta=meta)
|
||||||
|
|
||||||
assert mapper(story).timestamp == 5
|
assert mapper(story).int_timestamp == 5
|
||||||
|
|
||||||
def test_meta_with_empty_chapters(self, mapper, story):
|
def test_meta_with_empty_chapters(self, mapper, story):
|
||||||
"""
|
"""
|
||||||
|
@ -164,7 +164,7 @@ class TestStoryDateMapper:
|
||||||
|
|
||||||
story = story.merge(meta=meta)
|
story = story.merge(meta=meta)
|
||||||
|
|
||||||
assert mapper(story).timestamp == 5
|
assert mapper(story).int_timestamp == 5
|
||||||
|
|
||||||
def test_meta_with_only_chapter_dates(self, mapper, story):
|
def test_meta_with_only_chapter_dates(self, mapper, story):
|
||||||
"""
|
"""
|
||||||
|
@ -180,7 +180,7 @@ class TestStoryDateMapper:
|
||||||
|
|
||||||
story = story.merge(meta=meta)
|
story = story.merge(meta=meta)
|
||||||
|
|
||||||
assert mapper(story).timestamp == 5
|
assert mapper(story).int_timestamp == 5
|
||||||
|
|
||||||
def test_meta_with_only_story_date(self, mapper, story):
|
def test_meta_with_only_story_date(self, mapper, story):
|
||||||
"""
|
"""
|
||||||
|
@ -197,7 +197,7 @@ class TestStoryDateMapper:
|
||||||
|
|
||||||
story = story.merge(meta=meta)
|
story = story.merge(meta=meta)
|
||||||
|
|
||||||
assert mapper(story).timestamp == 5
|
assert mapper(story).int_timestamp == 5
|
||||||
|
|
||||||
def test_meta_with_latest_chapter_date(self, mapper, story):
|
def test_meta_with_latest_chapter_date(self, mapper, story):
|
||||||
"""
|
"""
|
||||||
|
@ -214,7 +214,7 @@ class TestStoryDateMapper:
|
||||||
|
|
||||||
story = story.merge(meta=meta)
|
story = story.merge(meta=meta)
|
||||||
|
|
||||||
assert mapper(story).timestamp == 5
|
assert mapper(story).int_timestamp == 5
|
||||||
|
|
||||||
def test_meta_with_latest_story_date(self, mapper, story):
|
def test_meta_with_latest_story_date(self, mapper, story):
|
||||||
"""
|
"""
|
||||||
|
@ -231,7 +231,7 @@ class TestStoryDateMapper:
|
||||||
|
|
||||||
story = story.merge(meta=meta)
|
story = story.merge(meta=meta)
|
||||||
|
|
||||||
assert mapper(story).timestamp == 5
|
assert mapper(story).int_timestamp == 5
|
||||||
|
|
||||||
def test_meta_with_both_latest(self, mapper, story):
|
def test_meta_with_both_latest(self, mapper, story):
|
||||||
"""
|
"""
|
||||||
|
@ -248,7 +248,7 @@ class TestStoryDateMapper:
|
||||||
|
|
||||||
story = story.merge(meta=meta)
|
story = story.merge(meta=meta)
|
||||||
|
|
||||||
assert mapper(story).timestamp == 5
|
assert mapper(story).int_timestamp == 5
|
||||||
|
|
||||||
|
|
||||||
class TestStoryPathMapper:
|
class TestStoryPathMapper:
|
||||||
|
|
Loading…
Reference in a new issue