diff options
author | James Tunnicliffe <james.tunnicliffe@linaro.org> | 2012-07-27 16:03:11 +0100 |
---|---|---|
committer | James Tunnicliffe <james.tunnicliffe@linaro.org> | 2012-07-27 16:03:11 +0100 |
commit | a91b826630bc7cf76075f9a4e78b29d26001d557 (patch) | |
tree | 7211df1f06da6ac95906dbf07a05a72c11be0238 /license_protected_downloads | |
parent | 2298abacfae5d21ff1a6fa64c7491cece2be187e (diff) |
A couple of minor test fixes
Diffstat (limited to 'license_protected_downloads')
-rw-r--r-- | license_protected_downloads/models.py | 26 | ||||
-rw-r--r-- | license_protected_downloads/tests/test_views.py | 3 |
2 files changed, 15 insertions, 14 deletions
diff --git a/license_protected_downloads/models.py b/license_protected_downloads/models.py index 9ba3d52..a0a71a8 100644 --- a/license_protected_downloads/models.py +++ b/license_protected_downloads/models.py @@ -2,19 +2,19 @@ from django.db import models class LicenseManager(models.Manager): - """ - Model manager for License model. - - Provides additional convenience method - """ - - def all_with_hashes(self, hash_list): - """ - Produce a list of licenses that match the specified list of hashes. - The main use case is to convert license digest to something the user - can relate to. - """ - return self.all().filter(digest__in=hash_list) + """ + Model manager for License model. + + Provides additional convenience method + """ + + def all_with_hashes(self, hash_list): + """ + Produce a list of licenses that match the specified list of hashes. + The main use case is to convert license digest to something the user + can relate to. + """ + return self.all().filter(digest__in=hash_list) class License(models.Model): diff --git a/license_protected_downloads/tests/test_views.py b/license_protected_downloads/tests/test_views.py index d945a1d..496dd08 100644 --- a/license_protected_downloads/tests/test_views.py +++ b/license_protected_downloads/tests/test_views.py @@ -264,7 +264,8 @@ class ViewTests(TestCase): # If we have access to the file, we will get an X-Sendfile response self.assertContains(response, - r"<th></th><th>Name</th><th>Last modified</th><th>Size</th>") + r"<th></th><th>Name</th><th>License</th><th>Last modified</th>" + "<th>Size</th>") def test_not_found_file(self): target_file = "12qwaszx" |