Fix random tests

dont-set-build-state-on-exit
Eric Holscher 2016-05-03 17:36:51 -07:00
parent 900d456aa3
commit bf76ec762c
2 changed files with 1 additions and 2 deletions

View File

@ -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)

View File

@ -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/')