summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/tests.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py
index 1268b4f03..432945ecb 100644
--- a/archaeological_finds/tests.py
+++ b/archaeological_finds/tests.py
@@ -52,8 +52,11 @@ class FindInit(ContextRecordInit):
self.base_finds = []
default = {'label': "Base find"}
- if not data_base.get('history_modifier'):
- data_base['history_modifier'] = self.get_default_user()
+ if not data_base.get('history_modifier') or not data_base[
+ 'history_modifier'].pk:
+ user = self.get_default_user()
+ user.save()
+ data_base['history_modifier'] = user
if force or not data_base.get('context_record'):
data_base['context_record'] = self.get_default_context_record(
force=force)
@@ -146,6 +149,8 @@ class AFindWizardCreationTest(WizardTest, FindInit, TestCase):
self.basefind_number + 1)
self.assertEqual(models.Find.objects.count(),
self.find_number + 1)
+ find = models.Find.objects.order_by("-pk")[0]
+ self.assertEqual(find.datings.count(), 1)
class ATreatmentWizardCreationTest(WizardTest, FindInit, TestCase):