From bf76ec762c04b437394510faf8e7ccfbdb15db23 Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Tue, 3 May 2016 17:36:51 -0700 Subject: [PATCH] Fix random tests --- readthedocs/projects/models.py | 1 - readthedocs/rtd_tests/tests/test_views.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index 7916726d9..b7e5b0e9e 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -845,7 +845,6 @@ class ImportedFile(models.Model): md5 = models.CharField(_('MD5 checksum'), max_length=255) commit = models.CharField(_('Commit'), max_length=255) - @models.permalink def get_absolute_url(self): return resolve(project=self.project, version_slug=self.version.slug, filename=self.path) diff --git a/readthedocs/rtd_tests/tests/test_views.py b/readthedocs/rtd_tests/tests/test_views.py index 6e22f30d0..6bc5fe8fc 100644 --- a/readthedocs/rtd_tests/tests/test_views.py +++ b/readthedocs/rtd_tests/tests/test_views.py @@ -179,7 +179,7 @@ class RandomPageTests(TestCase): def test_takes_project_slug(self): response = self.client.get('/random/pip/') self.assertEqual(response.status_code, 302) - self.assertTrue('/pip/' in response['Location']) + self.assertTrue('pip' in response['Location']) def test_404_for_unknown_project(self): response = self.client.get('/random/not-existent/')