django-quill-editor
django-quill-editor copied to clipboard
Writing test code
Hey @LeeHanYeong 😄
I really liked this package. It's awesome.
But I am facing a problem to set up my tests. I looked in the documentation and in the code for something I can use as a base to write them, but I didn't find it.
Do you have an example to guide me?
I'm currently trying something like this:
content = """{"delta":"{\"ops\":[{\"attributes\":{\"italic\":false,\"bold\":false},\"insert\":\"test\"},{\"insert\":\"\\n\"}]}","html":"<p>test</p>"}"""
data = {
'title': 'test',
'content': content
}
post = PostForm(data=data)
post.save()
# error django_quill.quill.QuillParseError: Failed to parse value -> value of variable content
The same error happens if I am checking that the form is valid.