Skip to content

Commit

Permalink
test: add empty context test
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Feb 4, 2025
1 parent 3426a49 commit 14ff5ad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xblock/test/test_field_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ def test_set_many(self):
def test_invalid_scope(self):
with pytest.raises(InvalidScopeError):
self.split.get(self.block, 'user_state')

def test_empty_scope(self):
with pytest.raises(InvalidScopeError):
split = SplitFieldData({
Scope.user_state: None
})
split.get(self.block, 'user_state')

def test_default(self):
self.split.default(self.block, 'content')
Expand Down

0 comments on commit 14ff5ad

Please sign in to comment.