diff --git a/Pipfile b/Pipfile index 4694564..7297fca 100644 --- a/Pipfile +++ b/Pipfile @@ -11,7 +11,6 @@ python-dateutil = "*" [dev-packages] coverage = "*" -nose = "*" sphinx = "*" sphinx-rtd-theme = "*" "urllib3" = "*" diff --git a/Pipfile.lock b/Pipfile.lock index c4666ca..b26c4af 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "6004978012c7f55b1915c22f9fe86d4f9780f45ab3bb95fa133747a80eb9a91f" + "sha256": "70b76ffaaf8a91ef90c80b1bdec2f72a34dc3981b5ee20a8f5990692a082f165" }, "pipfile-spec": 6, "requires": { @@ -515,15 +515,6 @@ "markers": "python_version >= '3.7'", "version": "==2.1.5" }, - "nose": { - "hashes": [ - "sha256:9ff7c6cc443f8c51994b34a667bbcf45afd6d945be7477b52e97516fd17c53ac", - "sha256:dadcddc0aefbf99eea214e0f1232b94f2fa9bd98fa8353711dacb112bfcbbb2a", - "sha256:f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98" - ], - "index": "pypi", - "version": "==1.3.7" - }, "packaging": { "hashes": [ "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", diff --git a/docs/rtd_requirements.txt b/docs/rtd_requirements.txt index ff85a77..006c34c 100644 --- a/docs/rtd_requirements.txt +++ b/docs/rtd_requirements.txt @@ -3,7 +3,6 @@ django>=3.1,<=4.2 django-haystack>=2.8,<=3.2 djangorestframework>=3.7.0,<=3.13 elasticsearch>=2.0.0,<=8.3.3 -nose sphinx sphinx-rtd-theme urllib3 diff --git a/setup.py b/setup.py index e409429..f6924b0 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ def get_version(package): "django-haystack>=2.8,<3.4", "python-dateutil", ], - tests_require=["nose", "coverage"], + tests_require=["coverage", "geopy", "requests"], zip_safe=False, test_suite="tests.run_tests.start", classifiers=[ diff --git a/tests/run_tests.py b/tests/run_tests.py index a875d52..43df728 100644 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -4,23 +4,17 @@ import os import sys -import nose + +import django +from django.core.management import call_command def start(argv=None): - sys.exitfunc = lambda: sys.stderr.write("Shutting down...\n") - - if argv is None: - argv = [ - "nosetests", - "--verbose", - "--with-coverage", - "--cover-erase", - "--cover-branches", - "--cover-package=drf_haystack", - ] - - nose.run_exit(argv=argv, defaultTest=os.path.abspath(os.path.dirname(__file__))) + sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) + os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings" + django.setup() + + call_command("test", sys.argv[1:]) if __name__ == "__main__":