mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-21 23:53:55 +02:00
test(data-extraction): Include first unit tests
This commit is contained in:
@ -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",
|
||||
}
|
||||
|
Reference in New Issue
Block a user