Add test for CI suite (#18350)

This commit is contained in:
Beppe Catanese 2024-04-10 17:49:34 +02:00 committed by GitHub
parent 6bcc28d06e
commit a887f6d4bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View File

@ -194,6 +194,7 @@ paths:
Update Email:
value:
email: rebecca@gmail.com
verified: true
Update Last Name & Date of Birth:
value:
lastName: Baker

View File

@ -109,7 +109,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"email\" : \"rebecca@gmail.com\"\n}",
"raw": "{\n \"email\" : \"rebecca@gmail.com\",\n \"verified\" : true\n}",
"options": {
"raw": {
"language": "json"

View File

@ -39,6 +39,13 @@ class TestParameters(unittest.TestCase):
# check values
self.assertTrue(set(data.get("tags")) == {"user", "admin", "guest"})
def test_request_boolean_field(self):
# item
item = self.json_data['item'][0]['item'][0]['item'][1]
self.assertEqual(item['name'], 'Update Email')
self.assertEqual(item['request']["method"], 'PATCH')
self.assertEqual(item['request']["body"]["raw"], '{\n "email" : "rebecca@gmail.com",\n "verified" : true\n}')
if __name__ == '__main__':
unittest.main()