X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/c32ea85e72f0c061117256319580f935b9419364..525e13d0c90998e3ba28b9c36f0ad5dfbdc2480e:/src/cover/tests.py?ds=inline diff --git a/src/cover/tests.py b/src/cover/tests.py index 558cd03c..09aee19a 100644 --- a/src/cover/tests.py +++ b/src/cover/tests.py @@ -104,7 +104,7 @@ class FlickrTests(TestCase): book = Book.create(slug='test', text=SAMPLE_XML, creator=user) self.client.post( - '/cover/quick-import/1/', + f'/cover/quick-import/{book.pk}/', { 'url': 'https://cyfrowe.mnw.art.pl/pl/zbiory/447973' } @@ -200,12 +200,12 @@ class TestCover(TestCase): self.assertEqual(len(response.context['object_list']), 1) def test_image(self): - response = self.client.get('/cover/image/1/') + response = self.client.get(f'/cover/image/{self.img.pk}/') self.assertEqual(response.context['object'].title, 'Angelus Novus') def test_edit_image(self): self.client.force_login(self.user) - response = self.client.post('/cover/image/1/', { + response = self.client.post(f'/cover/image/{self.img.pk}/', { 'author': 'author', 'title': 'changed title', 'license_name': 'domena', @@ -215,10 +215,10 @@ class TestCover(TestCase): 'cut_right': 1, }) - response = self.client.get('/cover/image/1/') + response = self.client.get(f'/cover/image/{self.img.pk}/') self.assertEqual(response.context['object'].title, 'changed title') def test_image_file(self): - response = self.client.get('/cover/image/1/file/') + response = self.client.get(f'/cover/image/{self.img.pk}/file/') self.assertRegex(response['Location'], r'^/media/cover/image/')