diff options
author | 2021-08-05 19:26:26 -0700 | |
---|---|---|
committer | 2021-08-05 19:26:26 -0700 | |
commit | ea7fc62ddc8d08b6acdb00ac2d9a024fee8ad634 (patch) | |
tree | 1f2b8eed2652c22ce1216289758467349dbc7c0a /tests | |
parent | Time: rename format_infraction_with_duration (diff) |
Time: support more timestamp formats as arguments
Remove the burden of conversion from the caller to clean up and simplify
the call sites. Handle timestamp conversions internally with arrow.get.
Remove format_infraction and get_time_delta because they're now
obsolete. Replace the former with discord_timestamp and the latter with
format_relative.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bot/utils/test_time.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/bot/utils/test_time.py b/tests/bot/utils/test_time.py index 02b5f8c17..027e2052e 100644 --- a/tests/bot/utils/test_time.py +++ b/tests/bot/utils/test_time.py @@ -43,10 +43,6 @@ class TimeTests(unittest.TestCase): time.humanize_delta(relativedelta(days=2, hours=2), 'hours', max_units) self.assertEqual(str(error.exception), 'max_units must be positive') - def test_format_infraction(self): - """Testing format_infraction.""" - self.assertEqual(time.format_infraction('2019-12-12T00:01:00Z'), '<t:1576108860:f>') - def test_format_with_duration_none_expiry(self): """format_with_duration should work for None expiry.""" test_cases = ( |