aboutsummaryrefslogtreecommitdiffstats
path: root/api/tests/test_models.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-01-01 21:15:29 +0100
committerGravatar Johannes Christ <[email protected]>2019-01-01 21:15:29 +0100
commita6e81b6757b43c68ee749006086035c3e8033f15 (patch)
treeb9fbfe6a0daac1884c83ad60476cc34a7b5d7971 /api/tests/test_models.py
parentapply stash (diff)
parentMerge pull request #156 from python-discord/django-beautify (diff)
Merge branch 'django' into django+add-role-viewset
Diffstat (limited to 'api/tests/test_models.py')
-rw-r--r--api/tests/test_models.py27
1 files changed, 19 insertions, 8 deletions
diff --git a/api/tests/test_models.py b/api/tests/test_models.py
index 91db2def..1419a7d7 100644
--- a/api/tests/test_models.py
+++ b/api/tests/test_models.py
@@ -1,11 +1,13 @@
+from datetime import datetime as dt, timezone
+
from django.test import SimpleTestCase
from ..models import (
- DocumentationLink, Member, ModelReprMixin,
- OffTopicChannelName, Role,
- SnakeFact, SnakeIdiom,
+ DocumentationLink, Infraction,
+ ModelReprMixin, OffTopicChannelName,
+ Role, SnakeFact, SnakeIdiom,
SnakeName, SpecialSnake,
- Tag
+ Tag, User
)
@@ -41,13 +43,22 @@ class StringDunderMethodTests(SimpleTestCase):
id=5, name='test role',
colour=0x5, permissions=0
),
- Member(
- id=5, name='bob',
- discriminator=1, avatar_hash=None
- ),
Tag(
title='bob',
embed={'content': "the builder"}
+ ),
+ User(
+ id=5, name='bob',
+ discriminator=1, avatar_hash=None
+ ),
+ Infraction(
+ user_id=5, actor_id=5,
+ type='kick', reason='He terk my jerb!'
+ ),
+ Infraction(
+ user_id=5, actor_id=5, hidden=True,
+ type='kick', reason='He terk my jerb!',
+ expires_at=dt(5018, 11, 20, 15, 52, tzinfo=timezone.utc)
)
)