Added poetry integration.
Description: * Fixed github actions; * Removed requirements.txt; * Fixed CONTRIBUTING.md; * Fixed black and flake8. Signed-off-by: Pavel <win10@list.ru>
This commit is contained in:
@ -135,7 +135,7 @@ class Project(orm.Model):
|
||||
type: str = orm.String(max_length=10, default="cs")
|
||||
target_branch_name: str = orm.String(max_length=100, default="master")
|
||||
header: str = orm.String(max_length=250, default="")
|
||||
jira_url: str = orm.String(max_length=500,)
|
||||
jira_url: str = orm.String(max_length=500)
|
||||
changelog_file: str = orm.String(max_length=250, default="")
|
||||
version_file: str = orm.String(max_length=250, default="")
|
||||
|
||||
|
||||
@ -106,13 +106,7 @@ def compare_results_include(excludable):
|
||||
|
||||
|
||||
def test_excluding_fields_from_list():
|
||||
fields = [
|
||||
"gearbox_type",
|
||||
"gears",
|
||||
"aircon_type",
|
||||
"year",
|
||||
"manufacturer__founded",
|
||||
]
|
||||
fields = ["gearbox_type", "gears", "aircon_type", "year", "manufacturer__founded"]
|
||||
excludable = ExcludableItems()
|
||||
excludable.build(items=fields, model_cls=Car, is_exclude=True)
|
||||
compare_results(excludable)
|
||||
@ -174,7 +168,7 @@ def test_nested_includes_from_dict():
|
||||
fields = {
|
||||
"id": ...,
|
||||
"name": ...,
|
||||
"manufacturer": {"name": ..., "hq": {"name": ..., "nicks": {"name": ...}},},
|
||||
"manufacturer": {"name": ..., "hq": {"name": ..., "nicks": {"name": ...}}},
|
||||
}
|
||||
excludable = ExcludableItems()
|
||||
excludable.build(items=fields, model_cls=Car, is_exclude=False)
|
||||
@ -185,7 +179,7 @@ def test_nested_includes_from_dict_with_set():
|
||||
fields = {
|
||||
"id": ...,
|
||||
"name": ...,
|
||||
"manufacturer": {"name": ..., "hq": {"name": ..., "nicks": {"name"}},},
|
||||
"manufacturer": {"name": ..., "hq": {"name": ..., "nicks": {"name"}}},
|
||||
}
|
||||
excludable = ExcludableItems()
|
||||
excludable.build(items=fields, model_cls=Car, is_exclude=False)
|
||||
|
||||
@ -167,11 +167,7 @@ def test_excluding_fields_in_endpoints():
|
||||
assert created_user.pk is not None
|
||||
assert created_user.password is None
|
||||
|
||||
user2 = {
|
||||
"email": "test@domain.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Doe",
|
||||
}
|
||||
user2 = {"email": "test@domain.com", "first_name": "John", "last_name": "Doe"}
|
||||
|
||||
response = client.post("/users/", json=user2)
|
||||
created_user = User(**response.json())
|
||||
|
||||
Reference in New Issue
Block a user