Skip to content

Commit b2c596e

Browse files
committed
assert timestamps are strings
1 parent 5fc0020 commit b2c596e

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

tests/test_organizations.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,17 @@ def test_update_organization_with_domain_data(
191191
}
192192
assert updated_organization.id == "org_01EHT88Z8J8795GZNQ4ZP1J81T"
193193
assert updated_organization.name == "Example Organization"
194-
assert updated_organization.domains[0].dict() == {
195-
"domain": "example.io",
196-
"object": "organization_domain",
197-
"id": "org_domain_01EHT88Z8WZEFWYPM6EC9BX2R8",
198-
"state": "verified",
199-
"organization_id": "org_01EHT88Z8J8795GZNQ4ZP1J81T",
200-
"verification_strategy": "dns",
201-
"verification_token": "token",
202-
"created_at": datetime.datetime.now().isoformat(),
203-
"updated_at": datetime.datetime.now().isoformat(),
204-
"verification_prefix": None,
205-
}
194+
domain = updated_organization.domains[0]
195+
assert domain.domain == "example.io"
196+
assert domain.object == "organization_domain"
197+
assert domain.id == "org_domain_01EHT88Z8WZEFWYPM6EC9BX2R8"
198+
assert domain.state == "verified"
199+
assert domain.organization_id == "org_01EHT88Z8J8795GZNQ4ZP1J81T"
200+
assert domain.verification_strategy == "dns"
201+
assert domain.verification_token == "token"
202+
assert domain.verification_prefix is None
203+
assert isinstance(domain.created_at, str)
204+
assert isinstance(domain.updated_at, str)
206205

207206
def test_delete_organization(self, capture_and_mock_http_client_request):
208207
request_kwargs = capture_and_mock_http_client_request(

0 commit comments

Comments
 (0)