Fix random tests
parent
900d456aa3
commit
bf76ec762c
|
@ -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)
|
||||
|
||||
|
|
|
@ -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/')
|
||||
|
|
Loading…
Reference in New Issue