Skip to content
This repository has been archived by the owner on May 12, 2022. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
singingwolfboy committed Jan 23, 2015
1 parent c4e7ba1 commit d8dc2e0
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 34 deletions.
22 changes: 4 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,18 @@
language: python


python:
- "2.7"

env:
- TRAVIS_MODE=1


before_install:
- export DJANGO_SETTINGS_MODULE=settings
- DJANGO_SETTINGS_MODULE=settings


# command to install dependencies
install:
- "pip install coveralls"
- "pip install pep8"
- "pip install pylint==1.2.1"
- "pip install -r requirements.txt"
- "pip install -r test_requirements.txt"
- "pip install coveralls"


# command to run tests and quality checks
script:
- coverage run ./manage.py test
- coverage report -m
- pep8 --config=.pep8 notifications
- pylint --rcfile=.pylintrc notifications --report=no

- pep8 notifications
- pylint notifications --report=no

after_success: coveralls
2 changes: 1 addition & 1 deletion notifications/base_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __setattr__(self, attribute, value):
We want our data models to have a schema that is fixed as design time!!!
"""

if not attribute in dir(self):
if attribute not in dir(self):
raise ValueError(
(
"Attempting to add a new attribute '{name}' that was not part of "
Expand Down
2 changes: 1 addition & 1 deletion notifications/store/tests/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ def test_cannot_create_instance(self):
"""

with self.assertRaises(TypeError):
BaseNotificationStoreProvider()
BaseNotificationStoreProvider() # pylint: disable=abstract-class-instantiated
2 changes: 1 addition & 1 deletion notifications/tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from django.test import TestCase

from notifications.data import (
from notifications.data import ( # pylint: disable=unused-import
NotificationMessage,
)

Expand Down
File renamed without changes.
11 changes: 0 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,5 @@ django-model-utils==1.4.0
South>=0.7.6
python-dateutil==2.1

# Testing Packages
coverage==3.7.1
django_nose
nose==1.3.3
httpretty==0.8.0
pep8==1.5.7
pylint==1.2.1
pep257==0.3.2
mock==1.0.1
testfixtures==4.0.0

# edX Packages
-e git+https://github.com/edx/opaque-keys.git@cba8e23f53ff3ce9d1f45871986c8974576185c0#egg=opaque-keys
4 changes: 2 additions & 2 deletions run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ECHO 'Running test suite'
coverage run manage.py test --verbosity=3
coverage report -m
coverage html
pep8 --config=.pep8 notifications
pylint --rcfile=.pylintrc notifications --report=no
pep8 notifications
pylint notifications --report=no
ECHO ''
ECHO 'View the full coverage report at {CODE_PATH}/edx-notifications/htmlcov/index.html'
ECHO ''
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Testing Packages
coverage==3.7.1
django_nose
nose==1.3.3
httpretty==0.8.0
pep8==1.5.7
pylint==1.2.1
pep257==0.3.2
mock==1.0.1
testfixtures==4.0.0

0 comments on commit d8dc2e0

Please sign in to comment.