[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-bank] 01/02: Explicitly importing urlconf from rever
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-bank] 01/02: Explicitly importing urlconf from reverse() |
Date: |
Thu, 02 Feb 2017 15:12:55 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository bank.
commit 678bc3260f91f22cecfbf78f9908f0ed790f2a16
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Feb 2 14:05:43 2017 +0100
Explicitly importing urlconf from reverse()
---
talerbank/app/tests.py | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py
index 9981b04..a5af7c9 100644
--- a/talerbank/app/tests.py
+++ b/talerbank/app/tests.py
@@ -19,6 +19,7 @@ from django.core.urlresolvers import reverse
from django.conf import settings
from django.contrib.auth.models import User
from .models import BankAccount
+from . import urlsadmin, urls
import logging
@@ -37,15 +38,13 @@ class RegisterTestCase(TestCase):
ba = BankAccount(user=bank, currency=settings.TALER_CURRENCY)
ba.account_no = 1
ba.save()
- settings.configure(ROOT_URLCONF="talerbank.app.urls")
def tearDown(self):
clearDb()
def test_register(self):
c = Client()
- logger.info("My ROOT_URLCONF, {}".format(settings.ROOT_URLCONF))
- response = c.post(reverse("register"),
+ response = c.post(reverse("register", urlconf=urls),
{"username": "test_register",
"password": "test_register"},
follow=True)
@@ -63,7 +62,6 @@ class LoginTestCase(TestCase):
user_account = BankAccount(user=user,
currency=settings.TALER_CURRENCY)
user_account.save()
- settings.configure(ROOT_URLCONF="talerbank.app.urls")
def tearDown(self):
@@ -72,8 +70,7 @@ class LoginTestCase(TestCase):
def test_login(self):
c = Client()
- logger.info("My ROOT_URLCONF, {}".format(settings.ROOT_URLCONF))
- response = c.post(reverse("login"),
+ response = c.post(reverse("login", urlconf=urls),
{"username": "test_user",
"password": "test_password"},
follow=True)
@@ -93,7 +90,6 @@ class AddIncomingTestCase(TestCase):
currency=settings.TALER_CURRENCY)
bank_account.save()
user_account.save()
- settings.configure(ROOT_URLCONF="talerbank.app.urlsadmin")
def tearDown(self):
clearDb()
@@ -101,7 +97,7 @@ class AddIncomingTestCase(TestCase):
def test_add_incoming(self):
c = Client()
data = '{"debit_account":1, "credit_account":2, "wtid":"TESTWTID",
"amount":{"value":1, "fraction":0, "currency":"%s"}}' % settings.TALER_CURRENCY
- response = c.post(reverse("add-incoming"),
+ response = c.post(reverse("add-incoming", urlconf=urlsadmin),
data=data,
content_type="application/json",
follow=True)
--
To stop receiving notification emails like this one, please contact
address@hidden