Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed Jul 5, 2024
1 parent 091f12c commit 90a0e5b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def setUp(self):
# the behavior of permissions is not exact, this changes every time you add a model
self.latest_content_type_id = content_type.id
self.latest_permission_id = permission.id
self.job_content_type_id = self.latest_content_type_id - 61
self.can_delete_job_permission_id = self.latest_permission_id - 245
self.job_content_type_id = self.latest_content_type_id - 62
self.can_delete_job_permission_id = self.latest_permission_id - 249

"""
🔽🔽🔽 format of PERMISSIONS
Expand Down
2 changes: 2 additions & 0 deletions breathecode/registry/tests/urls/v1/tests_academy_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ def put_serializer(academy, category, asset, data={}):
"assessment": asset.assessment,
"asset_type": asset.asset_type,
"author": asset.author,
"enable_table_of_content": asset.enable_table_of_content,
"interactive": asset.interactive,
"authors_username": None,
"category": {"id": category.id, "slug": category.slug, "title": category.title},
"cleaning_status": asset.cleaning_status,
Expand Down
2 changes: 2 additions & 0 deletions breathecode/registry/tests/urls/v1/tests_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def get_serializer(asset, data={}):
"slug": asset.slug,
"title": asset.title,
"asset_type": asset.asset_type,
"enable_table_of_content": asset.enable_table_of_content,
"interactive": asset.interactive,
"category": {
"id": asset.category.id,
"slug": asset.category.slug,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def get_serializer(bc: Breathecode, asset, asset_category=None, data={}):
return {
"assessment": asset.assessment,
"asset_type": asset.asset_type,
"enable_table_of_content": asset.enable_table_of_content,
"interactive": asset.interactive,
"author": asset.author,
"authors_username": None,
"category": get_asset_category(asset_category) if asset_category else None,
Expand Down

0 comments on commit 90a0e5b

Please sign in to comment.