Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
salman2013 committed Mar 15, 2024
1 parent 3698982 commit c756801
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xblock/test/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ def test_setting_the_same_value_marks_field_as_dirty():
# pylint: disable=unsubscriptable-object
class FieldTester(XBlock):
"""Test block for set - get test."""
non_mutable = String(scope=Scope.settings)
# non_mutable = String(scope=Scope.settings)
list_field = List(scope=Scope.settings)
dict_field = Dict(scope=Scope.settings)

Expand All @@ -714,17 +714,17 @@ class FieldTester(XBlock):
assert len(field_tester._dirty_fields) == 0
assert not field_tester.fields['list_field'].is_set_on(field_tester)
assert not field_tester.fields['dict_field'].is_set_on(field_tester)
assert not field_tester.fields['non_mutable'].is_set_on(field_tester)
# assert not field_tester.fields['non_mutable'].is_set_on(field_tester)

field_tester.non_mutable = field_tester.non_mutable
# field_tester.non_mutable = field_tester.non_mutable
field_tester.list_field = field_tester.list_field
field_tester.dict_field = field_tester.dict_field

assert not field_tester.fields['non_mutable'] in field_tester._dirty_fields
# assert not field_tester.fields['non_mutable'] in field_tester._dirty_fields
assert field_tester.fields['list_field'] in field_tester._dirty_fields
assert field_tester.fields['dict_field'] in field_tester._dirty_fields

assert not field_tester.fields['non_mutable'].is_set_on(field_tester)
# assert not field_tester.fields['non_mutable'].is_set_on(field_tester)
assert not field_tester.fields['list_field'].is_set_on(field_tester)
assert not field_tester.fields['dict_field'].is_set_on(field_tester)

Expand Down

0 comments on commit c756801

Please sign in to comment.