~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wlevents/tests.py

  • Committer: Holger Rapp
  • Date: 2019-06-21 18:34:42 UTC
  • mfrom: (540.1.3 update_ops_script)
  • Revision ID: sirver@gmx.de-20190621183442-y2ulybzr0rdvfefd
Adapt the update script for 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