diff --git a/.travis.yml b/.travis.yml index d147a9a60397aeb1cdace24d56ade0b9a863d5fd..ddd6d328560338c0370ef74dc089a600ae4a9349 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,13 @@ sudo: false language: python env: -- DJANGO="django>1.8,<1.9" DJANGO_SETTINGS_MODULE=representatives.tests.settings +- DJANGO_SETTINGS_MODULE=representatives.tests.settings python: - "2.7" before_install: - pip install codecov install: -- pip install $DJANGO pep8 flake8 pytest-django pytest-cov codecov django-responsediff -- pip install -e .[api] +- pip install -e .[api,testing] script: - pep8 representatives/ --exclude migrations --ignore E128 - flake8 representatives/ --exclude migrations --ignore E128 diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_constituencies_api/content b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_constituencies_api.content similarity index 100% rename from representatives/tests/response_fixtures/RepresentativeManagerTest.test_constituencies_api/content rename to representatives/tests/response_fixtures/RepresentativeManagerTest.test_constituencies_api.content diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_constituencies_api.metadata b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_constituencies_api.metadata new file mode 100644 index 0000000000000000000000000000000000000000..a2e0a6921bc4a7d94e1887a6eab7a49889fc3ace --- /dev/null +++ b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_constituencies_api.metadata @@ -0,0 +1,3 @@ +{ + "status_code": 200 +} \ No newline at end of file diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_constituencies_api/status_code b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_constituencies_api/status_code deleted file mode 100644 index ae4ee13c08e7628701b925b8962108bd7643bf6e..0000000000000000000000000000000000000000 --- a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_constituencies_api/status_code +++ /dev/null @@ -1 +0,0 @@ -200 \ No newline at end of file diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_groups_api/content b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_groups_api.content similarity index 100% rename from representatives/tests/response_fixtures/RepresentativeManagerTest.test_groups_api/content rename to representatives/tests/response_fixtures/RepresentativeManagerTest.test_groups_api.content diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_groups_api.metadata b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_groups_api.metadata new file mode 100644 index 0000000000000000000000000000000000000000..a2e0a6921bc4a7d94e1887a6eab7a49889fc3ace --- /dev/null +++ b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_groups_api.metadata @@ -0,0 +1,3 @@ +{ + "status_code": 200 +} \ No newline at end of file diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_groups_api/status_code b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_groups_api/status_code deleted file mode 100644 index ae4ee13c08e7628701b925b8962108bd7643bf6e..0000000000000000000000000000000000000000 --- a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_groups_api/status_code +++ /dev/null @@ -1 +0,0 @@ -200 \ No newline at end of file diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_mandates_api/content b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_mandates_api.content similarity index 100% rename from representatives/tests/response_fixtures/RepresentativeManagerTest.test_mandates_api/content rename to representatives/tests/response_fixtures/RepresentativeManagerTest.test_mandates_api.content diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_mandates_api.metadata b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_mandates_api.metadata new file mode 100644 index 0000000000000000000000000000000000000000..a2e0a6921bc4a7d94e1887a6eab7a49889fc3ace --- /dev/null +++ b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_mandates_api.metadata @@ -0,0 +1,3 @@ +{ + "status_code": 200 +} \ No newline at end of file diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_mandates_api/status_code b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_mandates_api/status_code deleted file mode 100644 index ae4ee13c08e7628701b925b8962108bd7643bf6e..0000000000000000000000000000000000000000 --- a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_mandates_api/status_code +++ /dev/null @@ -1 +0,0 @@ -200 \ No newline at end of file diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_representatives_api/content b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_representatives_api.content similarity index 100% rename from representatives/tests/response_fixtures/RepresentativeManagerTest.test_representatives_api/content rename to representatives/tests/response_fixtures/RepresentativeManagerTest.test_representatives_api.content diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_representatives_api.metadata b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_representatives_api.metadata new file mode 100644 index 0000000000000000000000000000000000000000..a2e0a6921bc4a7d94e1887a6eab7a49889fc3ace --- /dev/null +++ b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_representatives_api.metadata @@ -0,0 +1,3 @@ +{ + "status_code": 200 +} \ No newline at end of file diff --git a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_representatives_api/status_code b/representatives/tests/response_fixtures/RepresentativeManagerTest.test_representatives_api/status_code deleted file mode 100644 index ae4ee13c08e7628701b925b8962108bd7643bf6e..0000000000000000000000000000000000000000 --- a/representatives/tests/response_fixtures/RepresentativeManagerTest.test_representatives_api/status_code +++ /dev/null @@ -1 +0,0 @@ -200 \ No newline at end of file diff --git a/setup.py b/setup.py index 327b90f499b177b9cfb74c46affa4b8a7f8c950d..028d17446e647f7dc857c6fe06864138d94b0f6f 100644 --- a/setup.py +++ b/setup.py @@ -12,13 +12,23 @@ setup( license='GPLv3', keywords='django government parliament', install_requires=[ - 'ijson', + 'django>=1.8,<1.9', + 'ijson>=2,<3', ], extras_require={ 'celery': 'celery', 'api': [ - 'django-filter', - 'djangorestframework', + 'django-filter>=0.13,<0.14', + 'djangorestframework>=3,<4', + ], + 'testing': [ + 'codecov>=2,<3', + 'flake8>=2,<3', + 'pep8>=1,<2', + 'pytest>=2,<3', + 'pytest-django>=2,<3', + 'pytest-cov>=2,<3', + 'django-responsediff>=0.6,<0.7' ] }, entry_points={