summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-08 17:06:51 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:20 +0100
commit58f1d59d7f21f51558154074db52fe785e6763ff (patch)
tree6bbabcb11171f6c484f824e4a811e23072c7fcd9 /archaeological_operations
parent0667dd545924d17d5f46991e68cf5eeeefe6c0e2 (diff)
downloadIshtar-58f1d59d7f21f51558154074db52fe785e6763ff.tar.bz2
Ishtar-58f1d59d7f21f51558154074db52fe785e6763ff.zip
Import value formater: can use {item} notation for format
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/tests.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index 36b96176a..a37a824d4 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -490,6 +490,23 @@ class ImportOperationTest(ImportTest, TestCase):
)
f.delete()
+ f = ValueFormater.objects.create(name="-", slug="-", format_string="oa-{item}{item}")
+ column.value_format = f
+ column.save()
+
+ self.assertTrue(form.is_valid())
+ impt = form.save(self.ishtar_user)
+ impt.initialize()
+ self.init_ope_targetkey(imp=impt)
+ impt.importation()
+ self.assertEqual(
+ models.Operation.objects.filter(code_patriarche="oa-42014201").count(), 1
+ )
+ self.assertEqual(
+ models.Operation.objects.filter(code_patriarche="oa-42004200").count(), 1
+ )
+ f.delete()
+
def test_keys_limitation(self):
# each key association associated to the import
init_ope_number = models.Operation.objects.count()