diff options
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r-- | ishtar_common/tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
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: |