Fixed plugin tests

This commit is contained in:
Raphael Michel
2016-09-20 12:43:26 +02:00
parent f6cde4c6e0
commit 1b6be05a5f

View File

@@ -54,16 +54,16 @@ class EventsTest(SoupTest):
def test_plugins(self):
doc = self.get_doc('/control/event/%s/%s/settings/plugins' % (self.orga1.slug, self.event1.slug))
self.assertIn("Bank transfer", doc.select(".form-plugins")[0].text)
self.assertIn("Enable", doc.select("[name=plugin:pretix.plugins.banktransfer]")[0].text)
self.assertIn("PayPal", doc.select(".form-plugins")[0].text)
self.assertIn("Enable", doc.select("[name=plugin:pretix.plugins.paypal]")[0].text)
doc = self.post_doc('/control/event/%s/%s/settings/plugins' % (self.orga1.slug, self.event1.slug),
{'plugin:pretix.plugins.banktransfer': 'enable'})
self.assertIn("Disable", doc.select("[name=plugin:pretix.plugins.banktransfer]")[0].text)
{'plugin:pretix.plugins.paypal': 'enable'})
self.assertIn("Disable", doc.select("[name=plugin:pretix.plugins.paypal]")[0].text)
doc = self.post_doc('/control/event/%s/%s/settings/plugins' % (self.orga1.slug, self.event1.slug),
{'plugin:pretix.plugins.banktransfer': 'disable'})
self.assertIn("Enable", doc.select("[name=plugin:pretix.plugins.banktransfer]")[0].text)
{'plugin:pretix.plugins.paypal': 'disable'})
self.assertIn("Enable", doc.select("[name=plugin:pretix.plugins.paypal]")[0].text)
def test_live_disable(self):
self.event1.live = False