We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 300f239 commit ec87d18Copy full SHA for ec87d18
tests/test_api.py
@@ -482,6 +482,20 @@ def test_APIPostMedia(self):
482
483
self.wpapi.delete('media/%s?force=True' % created_id)
484
485
+ def test_APIPostComplexContent(self):
486
+ data = {
487
+ 'content': "this content has <a href='#'>links</a>"
488
+ }
489
+ res = self.wpapi.post('posts', data)
490
+
491
+ self.assertEqual(res.status_code, 201)
492
+ res_obj = res.json()
493
+ res_id= res_obj.get('id')
494
+ self.assertTrue(res_id)
495
+ print(res_obj)
496
+ res_content = res_obj.get('content').get('raw')
497
+ self.assertEqual(data.get('content'), res_content)
498
499
# def test_APIPostMediaBadCreds(self):
500
# """
501
# TODO: make sure the warning is "ensure login and basic auth is installed"
0 commit comments