Skip to content

Commit

Permalink
Fix test issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-Crow committed Jan 16, 2025
1 parent fa23fde commit c921720
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ DATABASE_USER=dju
DATABASE_PASSWORD=djpwd
DATABASE_HOST=127.0.0.1
DATABASE_PORT=5432
DEBUG=True
DEBUG=False
DATABASE_URL=postgres://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
2 changes: 0 additions & 2 deletions blog/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,4 @@ def test_deep_blog_works(self):
self.assertPageIsRenderable(new_blog_post)

response = self.client.get(deep_blog_index_page.url + "rss/")
print(deep_blog_index_page.url + "rss/")
print(response)
self.assertEqual(response.status_code, 200)
2 changes: 0 additions & 2 deletions content_manager/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,6 @@ def enlarge_link(self):
if len(call_to_action):
enlarge = False
elif len(tags):
print(tags)
print(tags.raw_data)
tags_list = tags.raw_data
for tag in tags_list:
if (
Expand Down
6 changes: 4 additions & 2 deletions content_manager/management/commands/import_dsfr_pictograms.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ def handle(self, *args, **kwargs):
image_exists = Image.objects.filter(title=full_image_title).first()
if image_exists:
file_hash = image_exists.get_file_hash()
print(f"A file named {full_image_title} already exists, skipping (file_hash: {file_hash})")
self.stdout.write(
f"A file named {full_image_title} already exists, skipping (file_hash: {file_hash})"
)
else:
image = import_image(
full_path=os.path.join(folder_path, filename),
Expand All @@ -49,4 +51,4 @@ def handle(self, *args, **kwargs):
image.tags.add("DSFR")
image.tags.add("Pictogrammes")
image.tags.add(folder_title)
print(f"File {full_image_title} imported")
self.stdout.write(f"File {full_image_title} imported")
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dev = [
]

[build-system]
requires = ["poetry-core"]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.black]
Expand Down

0 comments on commit c921720

Please sign in to comment.