Example #1
0
def test_update_entry_with_invalid_data():
    pet_id = create_random_int_inputs()
    test_data = create_pet_entry_data(pet_id=pet_id,
                                      pet_name=create_random_string_inputs(),
                                      pet_photo=[create_random_string_inputs()],
                                      pet_status=randomly_provide_status())
    updated_response = pet_store_operation.update_pet_entry(payload=test_data)
    assert updated_response.status_code == 200
    updated_response = json.loads(updated_response.text)
    check_results(test_data, updated_response)
Example #2
0
def test_just_passing_mandatory_fields():
    pet_id = create_random_int_inputs()
    test_data = create_pet_entry_data(
        pet_id=pet_id,
        pet_name=create_random_string_inputs(),
        pet_photo=[create_random_string_inputs()],
        pet_status=randomly_provide_status())
    response = pet_store_operation.create_pet_entry(payload=test_data)
    assert response.status_code == 200
    response = json.loads(response.text)
    check_results(test_data, response)