[Python-modules-commits] [django-polymorphic] 06/13: Add patch to remove dependency on dj_database_url in tests.
Michael Fladischer
fladi at moszumanska.debian.org
Sun Feb 4 13:19:39 UTC 2018
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch debian/master
in repository django-polymorphic.
commit e74326a5e4a4eff24baaff5d2cdff36ad13ff252
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date: Sun Feb 4 12:31:47 2018 +0100
Add patch to remove dependency on dj_database_url in tests.
---
debian/changelog | 1 +
...ve-dependency-on-dj_database_url-in-tests.patch | 43 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 45 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index b2aa634..57c6bc2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ django-polymorphic (2.0-1) UNRELEASED; urgency=low
* New upstream release.
* Always use pristine-tar.
* Refresh patches.
+ * Add patch to remove dependency on dj_database_url in tests.
-- Michael Fladischer <fladi at debian.org> Sat, 27 Jan 2018 13:52:50 +0100
diff --git a/debian/patches/0002-Remove-dependency-on-dj_database_url-in-tests.patch b/debian/patches/0002-Remove-dependency-on-dj_database_url-in-tests.patch
new file mode 100644
index 0000000..412433b
--- /dev/null
+++ b/debian/patches/0002-Remove-dependency-on-dj_database_url-in-tests.patch
@@ -0,0 +1,43 @@
+From: Michael Fladischer <FladischerMichael at fladi.at>
+Date: Sun, 4 Feb 2018 11:05:35 +0100
+Subject: Remove dependency on dj_database_url in tests.
+
+---
+ runtests.py | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/runtests.py b/runtests.py
+index bb3074d..2125821 100755
+--- a/runtests.py
++++ b/runtests.py
+@@ -2,7 +2,6 @@
+ import sys
+ from os.path import abspath, dirname
+
+-import dj_database_url
+ import django
+ from django.conf import settings
+ from django.core.management import execute_from_command_line
+@@ -19,14 +18,14 @@ if not settings.configured:
+ settings.configure(
+ DEBUG=False,
+ DATABASES={
+- 'default': dj_database_url.config(
+- env='PRIMARY_DATABASE',
+- default='sqlite://:memory:',
+- ),
+- 'secondary': dj_database_url.config(
+- env='SECONDARY_DATABASE',
+- default='sqlite://:memory:',
+- ),
++ 'default': {
++ 'ENGINE': 'django.db.backends.sqlite3',
++ 'NAME': ':memory:',
++ },
++ 'secondary': {
++ 'ENGINE': 'django.db.backends.sqlite3',
++ 'NAME': ':memory:',
++ },
+ },
+ TEST_RUNNER="django.test.runner.DiscoverRunner",
+ INSTALLED_APPS=(
diff --git a/debian/patches/series b/debian/patches/series
index 7f0b5b6..4d922e6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0001-use-local-objects.inv-where-possible.patch
+0002-Remove-dependency-on-dj_database_url-in-tests.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-polymorphic.git
More information about the Python-modules-commits
mailing list