test(data-extraction): Include first unit tests

This commit is contained in:
TrisNol
2023-09-17 19:20:28 +02:00
parent bfe50ac76d
commit febcd59e39
11 changed files with 492 additions and 124 deletions

View File

@ -1,7 +1,12 @@
"""Test Models.company."""
from aki_prj23_transparenzregister.models.company import Company, CompanyID, Location
from aki_prj23_transparenzregister.models.company import (
Capital,
Company,
CompanyID,
Location,
)
def test_to_dict() -> None:
@ -10,12 +15,17 @@ def test_to_dict() -> None:
location = Location(
city="Insmouth", house_number="19", street="Harbor", zip_code="1890"
)
capital = Capital(currency="BTC", type="Virtual assets", value=42)
company = Company(
id=company_id,
last_update="Tomorrow",
location=location,
name="BLANK GmbH",
relationships=[],
business_purpose="Blockchain and NFTs",
capital=capital,
company_type="Something",
founding_date="Yesterday",
)
assert company.to_dict() == {
@ -32,4 +42,12 @@ def test_to_dict() -> None:
},
"name": "BLANK GmbH",
"relationships": [],
"business_purpose": "Blockchain and NFTs",
"capital": {
"value": capital.value,
"currency": capital.currency,
"type": capital.type,
},
"company_type": "Something",
"founding_date": "Yesterday",
}