add nick
[laas.git] / src / notifier / tests / test_models.py
1 ##############################################################################
2 # Copyright (c) 2018 Sawyer Bergeron and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10
11 from django.test import TestCase
12 from notifier.models import Notifier
13 from django.contrib.auth.models import User
14
15
16 class NotifierTestCase(TestCase):
17
18     def test_valid_notifier_saves(self):
19
20         sender = User.objects.create()
21         recipient = User.objects.create()
22         self.assertTrue(
23             Notifier.objects.create(
24                 title='notification title',
25                 content='notification body',
26                 user=recipient,
27                 sender=sender,
28                 message_type='email'
29             )
30         )