diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-02-03 20:13:55 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-02-03 20:14:17 +0100 |
commit | 22876892d057f11be2c29c7ca26bfbaa6e3d8e61 (patch) | |
tree | 5409c36417d3d15381f9f58ed4eaca69556bad68 /ishtar_common/tests.py | |
parent | f2de1a673e0686e5d8f03700a64bedef7ccb0ff3 (diff) | |
download | Ishtar-22876892d057f11be2c29c7ca26bfbaa6e3d8e61.tar.bz2 Ishtar-22876892d057f11be2c29c7ca26bfbaa6e3d8e61.zip |
Admin: add CSV export to general types
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: |