Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix broken tests due to invalid fixture names #615

Merged
merged 3 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions proposals/templates/proposals/proposal_pdf.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
@font-face {
font-family: "Open Sans";
src: url('proposals/static/proposals/pdf_font/OpenSans-Regular.ttf');
font-weight: 400;
}

@font-face {
Expand All @@ -23,7 +22,6 @@
@font-face {
font-family: "Open Sans";
src: url('proposals/static/proposals/pdf_font/OpenSans-Italic.ttf');
font-weight: 400;
font-style: italic;
}

Expand Down
2 changes: 1 addition & 1 deletion proposals/tests/misc_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class MiscProposalTestCase(TestCase):
"compensations",
"recruitments",
"settings",
"registrations",
"00_registrations",
"groups",
"institutions",
]
Expand Down
12 changes: 9 additions & 3 deletions proposals/tests/proposal_submission_tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import logging

from django.contrib.auth.models import User, Group, AnonymousUser
from django.conf import settings
from django.test import TestCase
from django.core.management import call_command

from main.tests import BaseViewTestCase
from proposals.models import Proposal, Relation
Expand All @@ -28,8 +29,8 @@ class BaseProposalTestCase(TestCase):
"recruitments",
"specialdetails",
"traits",
"registrationkinds",
"registrations",
"00_registrations",
"01_registrationkinds",
"testing/test_users",
"testing/test_proposals",
]
Expand All @@ -38,6 +39,11 @@ def setUp(self):
self.setup_users()
self.setup_proposal()

# Disable logging warnings and all levels below
# Our (pdf) code logs warnings that are not relevant to the tests
# ERROR and CRITICAL are still logged
logging.disable(logging.WARN)

def setup_users(self):
self.secretary = User.objects.create_user(
"secretary",
Expand Down
4 changes: 2 additions & 2 deletions reviews/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class BaseReviewTestCase(TestCase):
fixtures = [
"relations",
"compensations",
"registrations",
"registrationkinds",
"00_registrations",
"01_registrationkinds",
"agegroups",
"groups",
"institutions",
Expand Down
Loading