diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-01-24 11:06:02 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-01-24 11:06:02 +0100 | 
| commit | 282186421b25ec64ce4c0559a418bc4bc4ad3ce0 (patch) | |
| tree | aa8966766bb6f7b6589612dfaa2132ef6ae12a72 /archaeological_finds/tests.py | |
| parent | a719417c6b94c095d49bcce4d6253f13b2ee5fe5 (diff) | |
| parent | 2a8d0c0edb7281e955fd7ad097e205f07cca1d5c (diff) | |
| download | Ishtar-282186421b25ec64ce4c0559a418bc4bc4ad3ce0.tar.bz2 Ishtar-282186421b25ec64ce4c0559a418bc4bc4ad3ce0.zip  | |
Merge branch 'v0.9' into wheezy
Diffstat (limited to 'archaeological_finds/tests.py')
| -rw-r--r-- | archaeological_finds/tests.py | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py index 18744ea3d..2d1367c58 100644 --- a/archaeological_finds/tests.py +++ b/archaeological_finds/tests.py @@ -20,8 +20,11 @@  import datetime  from django.conf import settings +from django.contrib.auth.models import User  from django.core.files.uploadedfile import SimpleUploadedFile +from django.core.urlresolvers import reverse  from django.test import TestCase +from django.test.client import Client  from ishtar_common.models import ImporterType, IshtarUser, ImporterColumn,\      FormaterType, ImportTarget @@ -294,6 +297,11 @@ class FindTest(FindInit, TestCase):      def setUp(self):          self.create_finds(force=True) +        password = 'mypassword' +        my_admin = User.objects.create_superuser( +            'myuser', 'myemail@test.com', password) +        self.client = Client() +        self.client.login(username=my_admin.username, password=password)      def testExternalID(self):          find = self.finds[0] @@ -309,6 +317,13 @@ class FindTest(FindInit, TestCase):                  base_find.context_record.external_id,                  base_find.label)) +    def testShowFind(self): +        find = self.finds[0] +        response = self.client.get(reverse('display-find', args=[find.pk])) +        self.assertEqual(response.status_code, 200) +        self.assertIn('load_window("/show-find/{}/");'.format(find.pk), +                      response.content) +  class PackagingTest(FindInit, TestCase):      fixtures = [settings.ROOT_PATH +  | 
