mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-02 21:32:15 +00:00
Refactor NoneType test to make use of the __str__ method thus including that method in the test as well.
This commit is contained in:
@@ -7,9 +7,9 @@ from decimal import *
|
|||||||
class ProfileTestCase(TestCase):
|
class ProfileTestCase(TestCase):
|
||||||
def test_str(self):
|
def test_str(self):
|
||||||
profile = models.Profile(first_name='Test', last_name='Case')
|
profile = models.Profile(first_name='Test', last_name='Case')
|
||||||
self.assertEqual(profile.name, 'Test Case')
|
self.assertEqual(str(profile), 'Test Case')
|
||||||
profile.initials = 'TC'
|
profile.initials = 'TC'
|
||||||
self.assertEqual(profile.name, 'Test Case "TC"')
|
self.assertEqual(str(profile), 'Test Case "TC"')
|
||||||
|
|
||||||
|
|
||||||
class VatRateTestCase(TestCase):
|
class VatRateTestCase(TestCase):
|
||||||
|
|||||||
Reference in New Issue
Block a user