forked from django-getpaid/django-plans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconftest.py
54 lines (50 loc) · 1.58 KB
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import os
import sys
from decimal import Decimal
from django.conf import settings
sys.path[:0] = [os.path.join(os.getcwd(), "demo")]
def pytest_configure(config):
settings.configure(
DATABASE_ENGINE="sqlite3",
DATABASES={
"default": {
"NAME": ":memory:",
"ENGINE": "django.db.backends.sqlite3",
"TEST_NAME": ":memory:",
},
},
DATABASE_NAME=":memory:",
TEST_DATABASE_NAME=":memory:",
INSTALLED_APPS=[
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.admin",
"django.contrib.sessions",
"django.contrib.sites",
"ordered_model",
"example.foo",
"plans",
],
ROOT_URLCONF="example.urls",
DEBUG=False,
SITE_ID=1,
TEMPLATE_DEBUG=True,
USE_TZ=True,
ALLOWED_HOSTS=["*"],
PLANS_INVOICE_ISSUER={
"issuer_name": "My Company Ltd",
"issuer_street": "48th Suny street",
"issuer_zipcode": "111-456",
"issuer_city": "Django City",
"issuer_country": "PL",
"issuer_tax_number": "PL123456789",
},
PLANS_TAX=Decimal(23.0),
PLANS_TAXATION_POLICY="plans.taxation.eu.EUTaxationPolicy",
PLANS_TAX_COUNTRY="PL",
PLANS_CURRENCY="PLN",
PLANS_VALIDATORS={
"MAX_FOO_COUNT": "example.foo.validators.max_foos_validator",
},
EMAIL_BACKEND="django.core.mail.backends.console.EmailBackend",
)