Skip to content

Commit

Permalink
[#1925] Add IATI version DB entry to test databases
Browse files Browse the repository at this point in the history
  • Loading branch information
KasperBrandt committed Nov 23, 2015
1 parent d927731 commit 09824ba
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 213 deletions.
4 changes: 4 additions & 0 deletions akvo/rsr/tests/pages/test_homepage.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.
"""

from akvo.codelists.models import Version

from django.conf import settings
from django.test import Client, TestCase

Expand All @@ -17,6 +19,8 @@ class PingTest(TestCase):
def setUp(self):
"""Setup."""
self.c = Client(HTTP_HOST=settings.RSR_DOMAIN)
iati_version = Version(code=settings.IATI_VERSION)
iati_version.save()

def test_redirect(self):
"""Ping /."""
Expand Down
5 changes: 5 additions & 0 deletions akvo/rsr/tests/pages/test_project_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.
"""

from akvo.codelists.models import Version

from django.conf import settings
from django.test import Client, TestCase
from ..utils import contains_template_errors
Expand All @@ -18,6 +20,9 @@ class PingTest(TestCase):
def setUp(self):
"""Setup."""
self.c = Client(HTTP_HOST=settings.RSR_DOMAIN)
iati_version = Version(code=settings.IATI_VERSION)
iati_version.save()

self.resp = self.c.get('/projects/')
self.en_resp = self.c.get('/en/projects/')
self.es_resp = self.c.get('/es/projects/')
Expand Down
5 changes: 5 additions & 0 deletions akvo/rsr/tests/test_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from django.test.client import RequestFactory
from akvo.rsr.middleware import _is_rsr_host, _is_naked_app_host, _partner_site
from akvo.rsr.models import PartnerSite, Organisation
from akvo.codelists.models import Version

STOCK_RSR_NETLOC = "http://{}".format(settings.RSR_DOMAIN)
AKVOAPP_NETLOC = "http://{}".format(settings.AKVOAPP_DOMAIN)
Expand Down Expand Up @@ -128,6 +129,8 @@ def setUp(self):
o1.save()
ps1 = PartnerSite(organisation=o1, hostname='partner1', cname='projects.partner1.org')
ps1.save()
iati_version = Version(code=settings.IATI_VERSION)
iati_version.save()

def test_partner_site(self):
"""."""
Expand Down Expand Up @@ -155,6 +158,8 @@ def setUp(self):
o1.save()
ps1 = PartnerSite(organisation=o1, hostname='partner1', cname=self.cname)
ps1.save()
iati_version = Version(code=settings.IATI_VERSION)
iati_version.save()

def test_partner_site(self):
"""."""
Expand Down
201 changes: 0 additions & 201 deletions akvo/test_runner.py

This file was deleted.

12 changes: 0 additions & 12 deletions akvo/test_runner_nodb.py

This file was deleted.

0 comments on commit 09824ba

Please sign in to comment.