Exemple #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)
Exemple #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')
Exemple #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)
Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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')
Exemple #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)