Last active
August 29, 2015 13:56
-
-
Save mineta/9306188 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.test import TestCase | |
class TestExample(TestCase): | |
""" | |
Here you can define multiple tests, but all must begin | |
with test_ | |
""" | |
def setUp(self): | |
""" | |
Optional. Define here your initial setup for your tests | |
""" | |
self.a = "my test" | |
def tearDown(self): | |
""" | |
Optional. This will be executed after running your tests | |
""" | |
del self.a | |
def test_example(self): | |
self.assertEqual("my test", self.a) | |
def test_example2(self): | |
b = 2 | |
self.assertNotEqual(b, "two") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment