Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacspe committed Nov 13, 2023
1 parent f204ec7 commit 26f8c61
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion competition/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Meta:

@ts_interface(context='competition')
class CompetitionSerializer(serializers.ModelSerializer):
competition_type = CompetitionTypeSerializer(many=False)
competition_type = CompetitionTypeSerializer(many=False, read_only=True)
upcoming_or_current_event = serializers.SerializerMethodField(
'get_upcoming_or_current')
history_events = serializers.SerializerMethodField('get_history_events')
Expand Down
14 changes: 13 additions & 1 deletion competition/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,19 @@ def test_permission_get(self):
def test_permission_update(self):
''' update permission OK'''
self.check_permissions(self.URL_PREFIX + '/strom/', 'PUT',
self.ALL_FORBIDDEN, {'start_year': 2020})
self.ONLY_STROM_OK_RESPONSES,
{
"id": 0,
"name": "STROM",
"slug": "strom",
"start_year": 1976,
"description": "popis",
"rules": "# Pravidlá",
"min_years_until_graduation": 0,
"sites": [
0
]
})

def test_permission_create(self):
''' create permission OK'''
Expand Down

0 comments on commit 26f8c61

Please sign in to comment.