From 0cfaad8faa6505a28d1c8662c1e58f9616a7beeb Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 3 Feb 2017 20:13:55 +0100 Subject: Admin: add CSV export to general types --- ishtar_common/tests.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ishtar_common/tests.py') diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index 458083ac3..0082624d7 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -300,6 +300,15 @@ class AdminGenTypeTest(TestCase): response.status_code, 200, msg="Can not access admin detail for {}.".format(model)) + def test_csv_export(self): + for model in self.models: + url = '/admin/{}/{}/'.format(self.module_name, + model.__name__.lower()) + response = self.client.post(url, {'action': 'export_as_csv'}) + self.assertEqual( + response.status_code, 200, + msg="Can not export as CSV for {}.".format(model)) + def test_str(self): # test __str__ for model in self.models: -- cgit v1.2.3