aboutsummaryrefslogtreecommitdiffstats
path: root/api/tests/test_models.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/tests/test_models.py')
-rw-r--r--api/tests/test_models.py48
1 files changed, 43 insertions, 5 deletions
diff --git a/api/tests/test_models.py b/api/tests/test_models.py
index 2e606801..968f003e 100644
--- a/api/tests/test_models.py
+++ b/api/tests/test_models.py
@@ -1,11 +1,15 @@
+from datetime import datetime
+
from django.test import SimpleTestCase
from ..models import (
- DocumentationLink, ModelReprMixin,
- OffTopicChannelName, Role,
- SnakeFact, SnakeIdiom,
- SnakeName, SpecialSnake,
- Tag, User
+ DeletedMessage, DocumentationLink,
+ Message, MessageDeletionContext,
+ ModelReprMixin, OffTopicChannelName,
+ Role, SnakeFact,
+ SnakeIdiom, SnakeName,
+ SpecialSnake, Tag,
+ User
)
@@ -26,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=datetime.utcnow()
+ ),
+ embeds=[]
+ ),
DocumentationLink(
'test', 'http://example.com', 'http://example.com'
),
@@ -41,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=datetime.utcnow()
+ ),
User(
id=5, name='bob',
discriminator=1, avatar_hash=None