Created
January 23, 2017 22:15
-
-
Save katiayn/80d8dd7a5958d9994009f401f3dc1a86 to your computer and use it in GitHub Desktop.
This file contains 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
class ProductQuestionnaireTestCase(TestCase): | |
def test_vat_20_if_biscuit_coated_in_chocolate(self): | |
product = ProductFactory() | |
form = ProductQuestionnaireForm(data={ | |
'is_biscuit': True, | |
'is_coated_in_chocolate': True | |
}) | |
self.assertTrue(form.is_valid()) | |
form.save() | |
product.refresh_from_db() | |
self.assertEqual(product.vat, 20) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment