aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2016-02-02 21:41:46 -0600
committerAndy Doan <andy.doan+gerrit@linaro.org>2016-02-10 16:55:24 +0000
commit9c7d3d29af2fc8b052d580742d92912a7a858ed9 (patch)
tree74d06a6bffba56ce3686962f02fbec23a862f43f
parentd8d78fc83a55251ce5a7a62efebd34dcafd9db8b (diff)
django 1.8: provide values for required parameters
New versions of Django now provide DB constraints against NULL values unless a Field explicitly allows NULL. This change is compatible with both Django 1.6 and 1.8 Change-Id: I94ca6e3fb2636af7a9d996ce4d627a3e06ac0c71 Reviewed-on: https://review.linaro.org/10365 Reviewed-by: Ben Copeland <ben.copeland@linaro.org> Reviewed-by: pfalcon Sokolovsky <paul.sokolovsky@linaro.org>
-rw-r--r--license_protected_downloads/tests/test_downloads_command.py2
-rw-r--r--license_protected_downloads/tests/test_models.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/license_protected_downloads/tests/test_downloads_command.py b/license_protected_downloads/tests/test_downloads_command.py
index dbb7473..d3bba82 100644
--- a/license_protected_downloads/tests/test_downloads_command.py
+++ b/license_protected_downloads/tests/test_downloads_command.py
@@ -9,7 +9,7 @@ from license_protected_downloads.management.commands.downloads_report import (
def _create_download(ip, name, hours_ago=0):
- d = Download.objects.create(ip=ip, name=name)
+ d = Download.objects.create(ip=ip, name=name, link=False)
if hours_ago > 0:
d.timestamp = datetime.datetime.now() - datetime.timedelta(
hours=hours_ago)
diff --git a/license_protected_downloads/tests/test_models.py b/license_protected_downloads/tests/test_models.py
index 784c0c2..5eb3f69 100644
--- a/license_protected_downloads/tests/test_models.py
+++ b/license_protected_downloads/tests/test_models.py
@@ -50,7 +50,7 @@ class LicenseTestCase(TestCase):
class APITokenTests(TestCase):
def setUp(self):
- self.key = APIKeyStore.objects.create(key='foo')
+ self.key = APIKeyStore.objects.create(key='foo', public=True)
self.request = None
def test_no_expire(self):