diff options
Diffstat (limited to 'archaeological_files/tests.py')
| -rw-r--r-- | archaeological_files/tests.py | 20 | 
1 files changed, 19 insertions, 1 deletions
| diff --git a/archaeological_files/tests.py b/archaeological_files/tests.py index 60f447c62..8a1069d51 100644 --- a/archaeological_files/tests.py +++ b/archaeological_files/tests.py @@ -25,7 +25,7 @@ from django.contrib.auth.models import User  from django.core.urlresolvers import reverse  from django.test.client import Client -from ishtar_common.tests import TestCase, COMMON_FIXTURES +from ishtar_common.tests import TestCase, COMMON_FIXTURES, create_superuser  from ishtar_common.models import Town, IshtarSiteProfile  from archaeological_files import models @@ -271,3 +271,21 @@ class FileOperationTest(TestCase, OperationInitTest, FileInit):          q = ParcelOwner.objects.filter(parcel__operation=self.operation,                                         parcel__parcel_number='42')          self.assertEqual(q.count(), 1) + + +class DashboardTest(TestCase, FileInit): +    fixtures = FILE_TOWNS_FIXTURES +    model = models.File + +    def setUp(self): +        self.username, self.password, self.user = create_superuser() +        IshtarSiteProfile.objects.create() +        self.create_file() + +    def test_dashboard(self): +        url = 'dashboard-file' +        c = Client() +        c.login(username=self.username, password=self.password) + +        response = c.get(reverse(url)) +        self.assertEqual(response.status_code, 200) | 
