Skip to content

Commit 52e5ab3

Browse files
committed
test: add empty context test
1 parent 3426a49 commit 52e5ab3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

xblock/test/test_field_data.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ def test_invalid_scope(self):
7676
with pytest.raises(InvalidScopeError):
7777
self.split.get(self.block, 'user_state')
7878

79+
def test_empty_scope(self):
80+
with pytest.raises(InvalidScopeError):
81+
split = SplitFieldData({
82+
Scope.user_state: None
83+
})
84+
split.get(self.block, 'user_state')
85+
7986
def test_default(self):
8087
self.split.default(self.block, 'content')
8188
self.content.default.assert_called_once_with(self.block, 'content')

0 commit comments

Comments
 (0)