summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-14 12:01:43 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-14 12:01:43 +0200
commitabc9942994eee6cd80ed9b678e2fdefe192aa8c0 (patch)
tree5d192a0f58e68030f1c8e1d258f2b9947231df12 /archaeological_finds
parent7ee1460ee7dbba9f6b1bfaff1bdc2f3191819ab3 (diff)
downloadIshtar-abc9942994eee6cd80ed9b678e2fdefe192aa8c0.tar.bz2
Ishtar-abc9942994eee6cd80ed9b678e2fdefe192aa8c0.zip
Fix tests
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/tests.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py
index 3f34ab495..e6eafd3ed 100644
--- a/archaeological_finds/tests.py
+++ b/archaeological_finds/tests.py
@@ -206,15 +206,15 @@ class TreatmentWizardCreationTest(WizardTest, FindInit, TestCase):
FormData(
'Move treament',
form_datas={
- 'file-treatment_creation': {},
- 'basetreatment-treatment_creation': {
- 'treatment_type': 4, # move
+ 'file': {},
+ 'basetreatment': {
+ 'treatment_type': None,
'person': 1, # doer
'location': 1, # associated warehouse
'year': 2016,
'target_is_basket': False
},
- 'selecfind-treatment_creation': {
+ 'selecfind': {
'pk': 1,
'resulting_pk': 1
}
@@ -236,10 +236,14 @@ class TreatmentWizardCreationTest(WizardTest, FindInit, TestCase):
person = Person.objects.create(name="default")
person.id = 1
person.save()
+
+ trt_type = models.TreatmentType.objects.get(txt_idx='moving')
+ self.form_datas[0].set('basetreatment', 'treatment_type', trt_type.pk)
+
self.find, base_find = self.get_default_find(force=True)
- self.form_datas[0].form_datas['selecfind-treatment_creation'][
+ self.form_datas[0].form_datas['selecfind'][
'pk'] = self.find.pk
- self.form_datas[0].form_datas['selecfind-treatment_creation'][
+ self.form_datas[0].form_datas['selecfind'][
'resulting_pk'] = self.find.pk
self.treatment_number = models.Treatment.objects.count()
super(TreatmentWizardCreationTest, self).pre_wizard()