diff options
Diffstat (limited to 'archaeological_files/tests.py')
| -rw-r--r-- | archaeological_files/tests.py | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/archaeological_files/tests.py b/archaeological_files/tests.py index 5a433b381..8cd53d946 100644 --- a/archaeological_files/tests.py +++ b/archaeological_files/tests.py @@ -1,6 +1,6 @@  #!/usr/bin/env python  # -*- coding: utf-8 -*- -# Copyright (C) 2010-2011 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2013 Étienne Loks  <etienne.loks_AT_peacefrogsDOTnet>  # This program is free software: you can redistribute it and/or modify  # it under the terms of the GNU Affero General Public License as @@ -22,17 +22,18 @@ Unit tests  """  import json +from django.conf import settings  from django.test import TestCase  import models  class FileTest(TestCase): -    fixtures = ['user.json', 'person_type-fr.json', 'organization_type-fr.json', -                'treatment_type-fr.json'] +    fixtures = [settings.ROOT_PATH + 'ishtar_common/fixtures/test-users.json']      model = models.File      def setUp(self):          self.extra_models, self.model_list = {}, [] +          user = models.IshtarUser.objects.get(pk=1)          person_type = models.PersonType(label=u'Test person type',                                          txt_idx='test_person', available=True) @@ -78,7 +79,8 @@ class FileTest(TestCase):      def testIntelligentHistorisation(self):          """ -        Test that to identical version are not recorded twice in the history +        Test that two identical version are not recorded twice in the history +        and that multiple saving in a short time are not considered          """          nb_hist = self.item.history.count()          self.item.internal_reference = u"Unité_Test" | 
