Add using the pk of the event rather than a static for atomicity when running other tests.

This commit is contained in:
Tom Price
2015-06-04 06:30:47 +01:00
parent 34aa607ccc
commit 89bdb3937b

View File

@@ -396,6 +396,8 @@ class EventTest(LiveServerTestCase):
e = self.browser.find_element_by_id('id_name')
e.send_keys('Test Event Name')
e.send_keys(Keys.ENTER)
self.browser.implicitly_wait(3)
# See redirected to success page
self.assertIn("N00001 | Test Event Name", self.browser.find_element_by_xpath('//h1').text)
event = models.Event.objects.get(name='Test Event Name')
self.assertIn("N0000%d | Test Event Name"%event.pk, self.browser.find_element_by_xpath('//h1').text)