summaryrefslogtreecommitdiffstats
path: root/tests/test_notification.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_notification.py')
-rw-r--r--tests/test_notification.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_notification.py b/tests/test_notification.py
index fddb88c..ae5ea2c 100644
--- a/tests/test_notification.py
+++ b/tests/test_notification.py
@@ -14,7 +14,7 @@ from django.test import Client
from combo.data.models import Page
from combo.apps.notifications.models import Notification, NotificationsCell
-from combo.apps.lingo.models import Regie, ActiveItems
+from combo.apps.lingo.models import Regie, ActiveItems, PaymentBackend
pytestmark = pytest.mark.django_db
@@ -29,6 +29,11 @@ def login(user):
@pytest.fixture
def regie():
try:
+ payment_backend = PaymentBackend.objects.get(slug='test1')
+ except PaymentBackend.DoesNotExist:
+ payment_backend = PaymentBackend.objects.create(
+ label='test1', slug='test1', service='dummy')
+ try:
regie = Regie.objects.get(slug='remote')
except Regie.DoesNotExist:
regie = Regie()
@@ -36,7 +41,7 @@ def regie():
regie.slug = 'remote'
regie.description = 'remote'
regie.payment_min_amount = Decimal(2.0)
- regie.service = 'dummy'
+ regie.payment_backend = payment_backend
regie.save()
return regie