Skip to content

Commit

Permalink
test(tests/): Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
setmao committed Feb 28, 2022
1 parent 9b0d299 commit e0fd6a1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/events/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def sponsored_block_event(user, get_time):
title='Camera engine office woman lights',
slug='camera-engine',
host=user,
language='ZHZH',
language='ENEN',
begin_time=get_time('2016-06-04 11:00'),
end_time=get_time('2016-06-04 11:25'),
location=Location.R2,
Expand Down
13 changes: 8 additions & 5 deletions src/proposals/tests/forms/test_proposal.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def talk_proposal_data():
'title': 'Beyond the Style Guides',
'category': 'PRAC',
'duration': 'PREF15',
'language': 'ZHZH',
'language': 'ENEN',
'talk_language': 'en',
'python_level': 'INTERMEDIATE',
'recording_policy': True,
Expand All @@ -23,6 +23,7 @@ def talk_proposal_data():
'first_time_speaker': True,
'living_in_taiwan': True,
'pre_recorded_policy': True,
'prefer_time': 'DAY_ONE_MORNING',
}


Expand Down Expand Up @@ -68,13 +69,14 @@ def tutorial_proposal_data():
'title': 'Beyond the Style Guides',
'category': 'PRAC',
'duration': 'HALFDAY',
'language': 'ZHZH',
'language': 'ENEN',
'talk_language': 'en',
'python_level': 'INTERMEDIATE',
'recording_policy': True,
'live_stream_policy': True,
'living_in_taiwan': True,
'pre_recorded_policy': True,
'prefer_time': 'DAY_ONE_MORNING',
}


Expand Down Expand Up @@ -132,9 +134,10 @@ def test_talk_proposal_update_form():
def test_tutorial_proposal_update_form():
form = TutorialProposalUpdateForm()
assert list(form.fields) == [
'title', 'category', 'duration', 'language', 'abstract', 'python_level',
'objective', 'detailed_description', 'outline', 'supplementary',
'recording_policy', 'live_stream_policy', 'slide_link',
'title', 'category', 'duration', 'language', 'talk_language',
'abstract', 'python_level', 'objective', 'detailed_description',
'outline', 'supplementary', 'recording_policy',
'live_stream_policy', 'slide_link',
]


Expand Down
6 changes: 4 additions & 2 deletions src/proposals/tests/views/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_talk_proposal_create_post(agreed_user, agreed_user_client):
'title': 'Beyond the Style Guides<br>',
'category': 'PRAC',
'duration': 'PREF15',
'language': 'ZHZH',
'language': 'ENEN',
'talk_language': 'en',
'python_level': 'INTERMEDIATE',
'recording_policy': True,
Expand All @@ -99,6 +99,7 @@ def test_talk_proposal_create_post(agreed_user, agreed_user_client):
'first_time_speaker': True,
'living_in_taiwan': True,
'pre_recorded_policy': True,
'prefer_time': 'DAY_ONE_MORNING',
}, follow=True)

proposal = TalkProposal.objects.get(
Expand All @@ -123,13 +124,14 @@ def test_tutorial_proposal_create_post(agreed_user, agreed_user_client):
'title': 'Beyond the Style Guides<br>',
'category': 'PRAC',
'duration': 'FULLDAY',
'language': 'ZHZH',
'language': 'ENEN',
'talk_language': 'en',
'python_level': 'INTERMEDIATE',
'recording_policy': True,
'live_stream_policy': True,
'living_in_taiwan': True,
'pre_recorded_policy': True,
'prefer_time': 'DAY_ONE_MORNING',
}, follow=True)

proposal = TutorialProposal.objects.get(
Expand Down
4 changes: 2 additions & 2 deletions src/proposals/tests/views/test_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def test_talk_proposal_edit_post(agreed_user_client, talk_proposal):
'title': 'Beyond the Style Guides<br>',
'category': 'PRAC',
'duration': 'PREF15',
'language': 'ZHZH',
'language': 'ENEN',
'python_level': 'INTERMEDIATE',
'recording_policy': True,
'live_stream_policy': True,
Expand Down Expand Up @@ -218,7 +218,7 @@ def test_tutorial_proposal_edit_post(agreed_user_client, tutorial_proposal):
'title': 'Beyond the Style Guides<br>',
'category': 'PRAC',
'duration': 'FULLDAY',
'language': 'ZHZH',
'language': 'ENEN',
'python_level': 'INTERMEDIATE',
'recording_policy': True,
'live_stream_policy': True,
Expand Down

0 comments on commit e0fd6a1

Please sign in to comment.