Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1925] Add IATI version DB entry to test databases #1931

Merged
merged 1 commit into from
Nov 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.