Add unit test
This commit is contained in:
parent
e1c53b99da
commit
4594060aa4
|
|
@ -273,6 +273,18 @@ class TestCreateCustomContentBlock:
|
|||
assert subtitle_block.get("id") is not None
|
||||
assert subtitle_block.get("value").get("text") == value.get("text")
|
||||
|
||||
def test_add_solution(self, teacher, get_client):
|
||||
content_type = "solution"
|
||||
value = {"text": "some solution"}
|
||||
client = get_client(teacher)
|
||||
input = create_block_input(content_type=content_type, value=value)
|
||||
new_content_block = self._add_content_block(client=client, input=input)
|
||||
subtitle_block = new_content_block.contents.raw_data[0]
|
||||
assert subtitle_block.get("id") is not None
|
||||
assert subtitle_block.get("value").get("text") == "<p>{}</p>".format(
|
||||
value.get("text")
|
||||
)
|
||||
|
||||
# def test_add_readonly(self):
|
||||
# content_type = "readonly"
|
||||
# value = {"text": "some subtitle"}
|
||||
|
|
|
|||
Loading…
Reference in New Issue