File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -101,9 +101,11 @@ def create_languages(db):
101101 from languages .languages import LANGUAGES
102102
103103 for language in LANGUAGES :
104- Language .objects .create (name = language ["English" ], code = language ["alpha2" ])
104+ Language .objects .get_or_create (
105+ name = language ["English" ], code = language ["alpha2" ]
106+ )
105107
106- Locale .objects .create (
108+ Locale .objects .get_or_create (
107109 language_code = get_supported_content_language_variant (settings .LANGUAGE_CODE ),
108110 )
109111
Original file line number Diff line number Diff line change @@ -109,6 +109,17 @@ def test_apply_and_notify_status_change(rf, mocker):
109109 queryset = Submission .objects .filter (status = Submission .STATUS .proposed ),
110110 )
111111
112+ accepted_submission .refresh_from_db ()
113+ rejected_submission .refresh_from_db ()
114+ waiting_list_proposal .refresh_from_db ()
115+
116+ assert accepted_submission .status == Submission .STATUS .accepted
117+ assert accepted_submission .pending_status is None
118+ assert rejected_submission .status == Submission .STATUS .rejected
119+ assert rejected_submission .pending_status is None
120+ assert waiting_list_proposal .status == Submission .STATUS .waiting_list
121+ assert waiting_list_proposal .pending_status is None
122+
112123 assert SentEmail .objects .filter (
113124 recipient = accepted_submission .speaker ,
114125 email_template = proposal_accepted_template ,
You can’t perform that action at this time.
0 commit comments