diff options
Diffstat (limited to 'api/tests/test_models.py')
-rw-r--r-- | api/tests/test_models.py | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/api/tests/test_models.py b/api/tests/test_models.py index 1419a7d7..1fe60c0d 100644 --- a/api/tests/test_models.py +++ b/api/tests/test_models.py @@ -3,9 +3,11 @@ from datetime import datetime as dt, timezone from django.test import SimpleTestCase from ..models import ( - DocumentationLink, Infraction, - ModelReprMixin, OffTopicChannelName, - Role, SnakeFact, SnakeIdiom, + DeletedMessage, DocumentationLink, + Infraction, Message, + MessageDeletionContext, ModelReprMixin, + OffTopicChannelName, Role, + SnakeFact, SnakeIdiom, SnakeName, SpecialSnake, Tag, User ) @@ -28,6 +30,23 @@ class ReprMixinTests(SimpleTestCase): class StringDunderMethodTests(SimpleTestCase): def setUp(self): self.objects = ( + DeletedMessage( + id=45, + author=User( + id=444, name='bill', + discriminator=5, avatar_hash=None + ), + channel_id=666, + content="wooey", + deletion_context=MessageDeletionContext( + actor=User( + id=5555, name='shawn', + discriminator=555, avatar_hash=None + ), + creation=dt.utcnow() + ), + embeds=[] + ), DocumentationLink( 'test', 'http://example.com', 'http://example.com' ), @@ -43,6 +62,23 @@ class StringDunderMethodTests(SimpleTestCase): id=5, name='test role', colour=0x5, permissions=0 ), + Message( + id=45, + author=User( + id=444, name='bill', + discriminator=5, avatar_hash=None + ), + channel_id=666, + content="wooey", + embeds=[] + ), + MessageDeletionContext( + actor=User( + id=5555, name='shawn', + discriminator=555, avatar_hash=None + ), + creation=dt.utcnow() + ), Tag( title='bob', embed={'content': "the builder"} |