diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-08-26 18:52:49 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-08-26 18:52:49 +0200 | 
| commit | 3eb99a41ae7c538da28a0acafac194ccc98ed349 (patch) | |
| tree | c58c93d887fee773cb8acdd2df6867ee5f051cd1 /archaeological_files/tests.py | |
| parent | 6ff0df3f163b04d43ccd5bca1f951bdf97c7954e (diff) | |
| download | Ishtar-3eb99a41ae7c538da28a0acafac194ccc98ed349.tar.bz2 Ishtar-3eb99a41ae7c538da28a0acafac194ccc98ed349.zip  | |
Django 1.11: fix dashboards - explicit ordering is needed when using distinct
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)  | 
