test_api_domains.py 434 B

1234567891011
  1. from conftest import DeSECAPIV1Client
  2. def test_create(api_user: DeSECAPIV1Client, random_domainname):
  3. assert api_user.domain_create(random_domainname()).status_code == 201
  4. def test_destroy(api_user_domain: DeSECAPIV1Client):
  5. n = len(api_user_domain.domain_list().json())
  6. assert api_user_domain.domain_destroy(api_user_domain.domains[0]).status_code == 204
  7. assert len(api_user_domain.domain_list().json()) == n - 1