~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wlwebchat/tests.py

  • Committer: kaputtnik
  • Date: 2019-05-30 18:20:02 UTC
  • mto: This revision was merged to the branch mainline in revision 540.
  • Revision ID: kaputtnik-20190530182002-g7l91m1xo28clghv
adjusted README; first commit on the new server

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
"""
2
 
This file demonstrates two different styles of tests (one doctest and one
 
1
"""This file demonstrates two different styles of tests (one doctest and one
3
2
unittest). These will both pass when you run "manage.py test".
4
3
 
5
4
Replace these with more appropriate tests for your application.
 
5
 
6
6
"""
7
7
 
8
8
from django.test import TestCase
9
9
 
 
10
 
10
11
class SimpleTest(TestCase):
 
12
 
11
13
    def test_basic_addition(self):
12
14
        """
13
15
        Tests that 1 + 1 always equals 2.
14
16
        """
15
 
        self.failUnlessEqual(1 + 1, 2)
 
17
        self.assertEqual(1 + 1, 2)
16
18
 
17
 
__test__ = {"doctest": """
 
19
__test__ = {'doctest': """
18
20
Another way to test that 1 + 1 is equal to 2.
19
21
 
20
22
>>> 1 + 1 == 2
21
23
True
22
24
"""}
23