Skip to content

Instantly share code, notes, and snippets.

@katiayn
Created January 23, 2017 22:10
Show Gist options
  • Save katiayn/2d75405e7868f31500b1ee189c7f9c09 to your computer and use it in GitHub Desktop.
Save katiayn/2d75405e7868f31500b1ee189c7f9c09 to your computer and use it in GitHub Desktop.
class ProductQuestionnaireTestCase(TestCase):
def test_vat_20_if_biscuit_coated_in_chocolate(self):
product = ProductFactory()
url = '/{}/questionnaire/'.format(product.pk)
self.client.post(url, {
'is_biscuit': True,
'is_coated_in_chocolate': True
})
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