예제 #1
0
    def test_verify_delete_repo(self):
        # For delete we have to create a repo first
        repo_create = post_data(post_repo_url(),
                                auth=get_auth(),
                                payload=None,
                                in_json=False)
        repo_deleted_data = delete_data(delete_repo_url(
            username=get_auth()[0], repo_name=repo_create.json()["name"]),
                                        auth=get_auth(),
                                        in_json=False)
        verify_common.verify_delete_http_status(repo_deleted_data, 204)

        # Get that repo and verify
        data = get_data(get_single_repo_url(
            username=get_auth()[0], repo_name=repo_create.json()["name"]),
                        auth=get_auth(),
                        in_json=False)
        verify_common.verify_get_single_repo(data, 404)
예제 #2
0
 def test_verify_get_all_id_exist(self):
     data = get_data(get_repos_url(username=get_auth()[0]), auth=get_auth(), in_json=True)
     verify_common.verify_id_exist(data, 'id')
예제 #3
0
 def test_contract_get_all(self):
     data = get_data(get_repos_url(username=get_auth()[0]), auth=get_auth(), in_json=True)
     verify_common.verify_contract(data, get_all_repo_contract.get_all_repos)
예제 #4
0
 def test_verify_get_all_headers(self):
     data = get_data(get_repos_url(username=get_auth()[0]), auth=get_auth(), in_json=False)
     verify_common.verify_headers(data, 'application/json; charset=utf-8')
예제 #5
0
 def test_verify_get_all_important_keys(self):
     data = get_data(get_repos_url(username=get_auth()[0]), auth=get_auth(), in_json=True)
     verify_common.verify_important_keys(data, 'id,,name,html_url')
예제 #6
0
 def test_verify_get_all_http_code(self):
     data = get_data(get_repos_url(username=get_auth()[0]), auth=get_auth(), in_json=False)
     verify_common.verify_http_code(data, '200')
예제 #7
0
 def test_verify_get_all_response(self):
     data = get_data(get_repos_url(username=get_auth()[0]), auth=get_auth(), in_json=True)
     verify_common.verify_repo_data(data, 'Demo11236')
예제 #8
0
 def test_verify_repo_by_get(self):
     data = get_data(get_single_repo_url(username=get_auth()[0],
                                         repo_name=name),
                     auth=get_auth(),
                     in_json=True)
     verify_common.verify_single_repo_data(data, updated_name)