Skip to content

Commit

Permalink
new test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi77 committed Aug 16, 2016
1 parent 198d7d0 commit 128cd3d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install:
- pip install --upgrade mock

script:
- coverage run ./manage.py test
- coverage run setup.py test

after_success:
- coveralls
6 changes: 0 additions & 6 deletions manage.py

This file was deleted.

3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
packages=find_packages(exclude=['testapp']),
install_requires=[
'django>=1.4'
]
],
test_suite='testapp.tests'
)
6 changes: 5 additions & 1 deletion testapp/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

import django

os.environ['DJANGO_SETTINGS_MODULE'] = 'testapp.settings'
if hasattr(django, 'setup'):
django.setup()

try:
from unittest.mock import patch, Mock
except ImportError:
Expand All @@ -24,7 +28,7 @@ def get_result(self, command, **params):


def load_test_data(filename):
return json.load(open(os.path.join('testapp', 'testdata', filename)))
return json.load(open(os.path.join(os.path.dirname(__file__), 'testdata', filename)))


PULL_STREAM_TEST_DATA = load_test_data('pull_stream.json')
Expand Down

0 comments on commit 128cd3d

Please sign in to comment.