aboutsummaryrefslogtreecommitdiffstats
path: root/api/tests/test_models.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2018-11-18 21:27:11 +0100
committerGravatar Johannes Christ <[email protected]>2018-11-18 21:27:11 +0100
commit78b56879642608cd1873d2a6c3ea94e00ec63ae4 (patch)
treefb73921e339c9eac7b7d3ad852fef6bec676337e /api/tests/test_models.py
parentUse proper field class name. (diff)
Add the `DeletedMessage` model.
Diffstat (limited to 'api/tests/test_models.py')
-rw-r--r--api/tests/test_models.py30
1 files changed, 24 insertions, 6 deletions
diff --git a/api/tests/test_models.py b/api/tests/test_models.py
index b36f29b9..8d41c23e 100644
--- a/api/tests/test_models.py
+++ b/api/tests/test_models.py
@@ -3,12 +3,13 @@ from datetime import datetime
from django.test import SimpleTestCase
from ..models import (
- DocumentationLink, Member,
- Message, MessageDeletionContext,
- ModelReprMixin, OffTopicChannelName,
- Role, SnakeFact,
- SnakeIdiom, SnakeName,
- SpecialSnake, Tag
+ DeletedMessage, DocumentationLink,
+ Member, Message,
+ MessageDeletionContext, ModelReprMixin,
+ OffTopicChannelName, Role,
+ SnakeFact, SnakeIdiom,
+ SnakeName, SpecialSnake,
+ Tag
)
@@ -29,6 +30,23 @@ class ReprMixinTests(SimpleTestCase):
class StringDunderMethodTests(SimpleTestCase):
def setUp(self):
self.objects = (
+ DeletedMessage(
+ id=45,
+ author=Member(
+ id=444, name='bill',
+ discriminator=5, avatar_hash=None
+ ),
+ channel_id=666,
+ content="wooey",
+ deletion_context=MessageDeletionContext(
+ actor=Member(
+ id=5555, name='shawn',
+ discriminator=555, avatar_hash=None
+ ),
+ creation=datetime.utcnow()
+ ),
+ embeds=[]
+ ),
DocumentationLink(
'test', 'http://example.com', 'http://example.com'
),