forked from evonove/django-money-rates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
966d116
commit 4a73df2
Showing
5 changed files
with
41 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ lib64 | |
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.cache | ||
.coverage | ||
.tox | ||
nosetests.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
py-moneyed==0.6.0 | ||
mock>=1.0.1 | ||
nose>=1.3.0 | ||
django-nose>=1.2 | ||
pytest-mock==1.2 | ||
pytest==2.9.2 | ||
pytest-django==3.1.2 | ||
|
||
|
||
# Additional test requirements go here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,4 @@ | ||
import sys | ||
from optparse import OptionParser | ||
import pytest | ||
|
||
try: | ||
from django.conf import settings | ||
|
||
settings.configure( | ||
DEBUG=True, | ||
USE_TZ=True, | ||
DATABASES={ | ||
"default": { | ||
"ENGINE": "django.db.backends.sqlite3", | ||
} | ||
}, | ||
ROOT_URLCONF="djmoney_rates.urls", | ||
INSTALLED_APPS=[ | ||
"django.contrib.auth", | ||
"django.contrib.contenttypes", | ||
"django.contrib.sites", | ||
"djmoney_rates", | ||
], | ||
SITE_ID=1, | ||
NOSE_ARGS=['-s'], | ||
) | ||
|
||
from django_nose import NoseTestSuiteRunner | ||
except ImportError: | ||
raise ImportError("To fix this error, run: pip install -r requirements-test.txt") | ||
|
||
|
||
def run_tests(*test_args): | ||
if not test_args: | ||
test_args = ['tests'] | ||
|
||
# Run tests | ||
test_runner = NoseTestSuiteRunner(verbosity=1) | ||
|
||
failures = test_runner.run_tests(test_args) | ||
|
||
if failures: | ||
sys.exit(failures) | ||
|
||
|
||
if __name__ == '__main__': | ||
parser = OptionParser() | ||
(options, args) = parser.parse_args() | ||
run_tests(*args) | ||
sys.exit(pytest.main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
USE_TZ = True | ||
|
||
DATABASES = { | ||
"default": { | ||
"ENGINE": "django.db.backends.sqlite3", | ||
"NAME": "example.sqlite", | ||
} | ||
} | ||
|
||
ROOT_URLCONF = "djmoney_rates.urls" | ||
|
||
INSTALLED_APPS = [ | ||
"django.contrib.auth", | ||
"django.contrib.contenttypes", | ||
"django.contrib.sites", | ||
"djmoney_rates", | ||
] | ||
|
||
SECRET_KEY = "1234567890evonove" | ||
|
||
TEMPLATES = [ | ||
{ | ||
'OPTIONS': { | ||
'debug': True, | ||
} | ||
} | ||
] | ||
|
||
SITE_ID = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters