summaryrefslogtreecommitdiff
path: root/ishtar_common/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-21 16:45:01 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:17 +0100
commit0fa4634850a1891e5c42fb316d619d84a0649066 (patch)
tree440921733d43110c153fdde679654c51861dbe73 /ishtar_common/tests.py
parent70db2bc451922d7744edb8b9b2c8534837863978 (diff)
downloadIshtar-0fa4634850a1891e5c42fb316d619d84a0649066.tar.bz2
Ishtar-0fa4634850a1891e5c42fb316d619d84a0649066.zip
Admin - Custom fields: exports and imports CSV, json (refs #5406)
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r--ishtar_common/tests.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index e3af9024f..1ddc94cb2 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -1552,7 +1552,7 @@ class AdminGenTypeTest(TestCase):
models.Format,
models.SupportType,
]
- models_with_data = gen_models + [models.ImporterModel]
+ models_with_data = gen_models + [models.ImporterModel, models.JsonDataField]
models = models_with_data
module_name = "ishtar_common"
ishtar_apps = [
@@ -1569,6 +1569,14 @@ class AdminGenTypeTest(TestCase):
"ishtar_common.ProfileTypeSummary",
]
+ def extra_setup_data(self):
+ models.JsonDataField.objects.create(
+ name="Extra data",
+ content_type=ContentType.objects.get(model="operation"),
+ key="extra_data",
+ value_type="T"
+ )
+
def setUp(self):
self.password = "mypassword"
self.username = "myuser"
@@ -1579,6 +1587,7 @@ class AdminGenTypeTest(TestCase):
user.save()
self.client = Client()
self.client.login(username=self.username, password=self.password)
+ self.extra_setup_data()
def test_listing_and_detail(self):
models = []