|
@@ -6,6 +6,7 @@ import mutagen
|
|
|
import pytest
|
|
|
|
|
|
import symuid
|
|
|
+from symuid._datetime import datetime_utc_now
|
|
|
|
|
|
# pylint: disable=redefined-outer-name,protected-access
|
|
|
|
|
@@ -148,7 +149,6 @@ def test_increase_play_count(empty_id3_track):
|
|
|
empty_id3_track.register_play_count(init_count)
|
|
|
assert empty_id3_track.get_play_count_sum() == 3
|
|
|
empty_id3_track.increase_play_count('a', '0')
|
|
|
- dt_now = symuid._utc_dt_now()
|
|
|
assert empty_id3_track.get_play_count_sum() == 4
|
|
|
counts = set(empty_id3_track._get_play_counts())
|
|
|
assert len(counts) == 2
|
|
@@ -156,7 +156,7 @@ def test_increase_play_count(empty_id3_track):
|
|
|
new_count = counts.pop()
|
|
|
assert new_count.player == 'a'
|
|
|
assert new_count.library_id == '0'
|
|
|
- assert abs(new_count.register_dt - dt_now).total_seconds() < 5
|
|
|
+ assert abs(new_count.register_dt - datetime_utc_now()).total_seconds() < 5
|
|
|
assert new_count.count == 4
|
|
|
|
|
|
|
|
@@ -166,7 +166,7 @@ def test_increase_play_count_init(empty_id3_track):
|
|
|
count, = empty_id3_track._get_play_counts()
|
|
|
assert count.player == 'a'
|
|
|
assert count.library_id == '0'
|
|
|
- assert abs(count.register_dt - symuid._utc_dt_now()).total_seconds() < 5
|
|
|
+ assert abs(count.register_dt - datetime_utc_now()).total_seconds() < 5
|
|
|
assert count.count == 1
|
|
|
|
|
|
|