generated from daniil-berg/boilerplate-py
Add fixtures; minor changes
This commit is contained in:
parent
cf83e0074e
commit
81a55ba452
@ -39,7 +39,7 @@ class DB:
|
||||
force_auto_coercion()
|
||||
|
||||
@property
|
||||
def engine(self):
|
||||
def engine(self) -> Engine:
|
||||
if self._engine is None:
|
||||
self.start_engine()
|
||||
assert isinstance(self._engine, (AsyncEngine, Engine))
|
||||
|
@ -36,7 +36,7 @@ class LegalForm(AbstractBase, table=True):
|
||||
# Fields
|
||||
short: str = Field(max_length=32, nullable=False, index=True)
|
||||
name: Optional[str] = Field(default=None, max_length=255, sa_column=Column(Unicode(255)))
|
||||
country: str = Field(sa_column=Column(CountryType))
|
||||
country: Optional[str] = Field(sa_column=Column(CountryType))
|
||||
|
||||
# Relationships
|
||||
subcategories: list['LegalFormSubcategory'] = Relationship(
|
||||
|
5
tests/fixtures/companies/company.json
vendored
Normal file
5
tests/fixtures/companies/company.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
{
|
||||
|
||||
}
|
||||
]
|
0
tests/fixtures/companies/company_industry.json
vendored
Normal file
0
tests/fixtures/companies/company_industry.json
vendored
Normal file
9
tests/fixtures/companies/industry.json
vendored
Normal file
9
tests/fixtures/companies/industry.json
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Energy"
|
||||
}, {
|
||||
"id": 2,
|
||||
"name": "Retail"
|
||||
}
|
||||
]
|
16
tests/fixtures/companies/legal_form.json
vendored
Normal file
16
tests/fixtures/companies/legal_form.json
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"short": "KG",
|
||||
"name": "Kommanditgesellschaft",
|
||||
"country": "DE"
|
||||
}, {
|
||||
"id": 2,
|
||||
"short": "AG",
|
||||
"name": "Aktiengesellschaft",
|
||||
"country": "DE"
|
||||
}, {
|
||||
"id": 123,
|
||||
"short": "Ausl.HRB"
|
||||
}
|
||||
]
|
17
tests/fixtures/companies/legal_form_subcategory.json
vendored
Normal file
17
tests/fixtures/companies/legal_form_subcategory.json
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"id": 111,
|
||||
"short": "GmbH & Co. KG",
|
||||
"name": "Gesellschaft mit beschränkter Haftung & Compagnie Kommanditgesellschaft",
|
||||
"legal_form_id": 1
|
||||
}, {
|
||||
"id": 112,
|
||||
"short": "AG & Co. KG",
|
||||
"name": "Aktiengesellschaft & Compagnie Kommanditgesellschaft",
|
||||
"legal_form_id": 1
|
||||
}, {
|
||||
"id": 69420,
|
||||
"short": "LLC",
|
||||
"legal_form_id": 123
|
||||
}
|
||||
]
|
8
tests/fixtures/geography/address.json
vendored
Normal file
8
tests/fixtures/geography/address.json
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"id": 9999999,
|
||||
"house_number": "123AB",
|
||||
"supplement": "whatever",
|
||||
"street_id": 1
|
||||
}
|
||||
]
|
23
tests/fixtures/geography/city.json
vendored
Normal file
23
tests/fixtures/geography/city.json
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
[
|
||||
{
|
||||
"id": 1122,
|
||||
"zip_code": "10405",
|
||||
"name": "Berlin",
|
||||
"state_province_id": 100
|
||||
}, {
|
||||
"id": 9,
|
||||
"zip_code": "33299",
|
||||
"name": "Miami",
|
||||
"state_province_id": 30
|
||||
}, {
|
||||
"id": 10,
|
||||
"zip_code": "33694",
|
||||
"name": "Tampa",
|
||||
"state_province_id": 30
|
||||
}, {
|
||||
"id": 78787878,
|
||||
"zip_code": "91000",
|
||||
"name": "Luhansk",
|
||||
"state_province_id": 4531354
|
||||
}
|
||||
]
|
15
tests/fixtures/geography/state_province.json
vendored
Normal file
15
tests/fixtures/geography/state_province.json
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
[
|
||||
{
|
||||
"id": 100,
|
||||
"country": "DE",
|
||||
"name": "Berlin"
|
||||
}, {
|
||||
"id": 30,
|
||||
"country": "US",
|
||||
"name": "Florida"
|
||||
}, {
|
||||
"id": 4531354,
|
||||
"country": "UA",
|
||||
"name": "Luhansk Oblast"
|
||||
}
|
||||
]
|
7
tests/fixtures/geography/street.json
vendored
Normal file
7
tests/fixtures/geography/street.json
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Some Street",
|
||||
"city_id": 1122
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue
Block a user