mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
lint
This commit is contained in:
parent
460849bd3d
commit
778a42a35f
3 changed files with 1 additions and 9 deletions
|
@ -94,7 +94,6 @@ class BaseDocument:
|
|||
return self.schema.from_orm(result[0])
|
||||
except IndexError:
|
||||
return None
|
||||
|
||||
return [self.schema.from_orm(x) for x in result]
|
||||
|
||||
def create(self, session: Session, document: dict) -> BaseModel:
|
||||
|
@ -113,10 +112,8 @@ class BaseDocument:
|
|||
|
||||
return self.schema.from_orm(new_document)
|
||||
|
||||
|
||||
def update(self, session: Session, match_value: str, new_data: str) -> BaseModel:
|
||||
"""Update a database entry.
|
||||
|
||||
Args: \n
|
||||
session (Session): Database Session
|
||||
match_value (str): Match "key"
|
||||
|
@ -132,8 +129,6 @@ class BaseDocument:
|
|||
session.commit()
|
||||
return self.schema.from_orm(entry)
|
||||
|
||||
|
||||
|
||||
def delete(self, session: Session, primary_key_value) -> dict:
|
||||
result = session.query(self.sql_model).filter_by(**{self.primary_key: primary_key_value}).one()
|
||||
|
||||
|
|
|
@ -77,8 +77,6 @@ def test_cleaner_instructions(instructions):
|
|||
]
|
||||
|
||||
|
||||
|
||||
|
||||
def test_html_with_recipe_data():
|
||||
path = TEST_RAW_HTML.joinpath("healthy_pasta_bake_60759.html")
|
||||
url = "https://www.bbc.co.uk/food/recipes/healthy_pasta_bake_60759"
|
||||
|
|
|
@ -16,7 +16,7 @@ def test_non_default_settings(monkeypatch):
|
|||
assert app_settings.DEFAULT_GROUP == "Test Group"
|
||||
assert app_settings.DEFAULT_PASSWORD == "Test Password"
|
||||
assert app_settings.API_PORT == 8000
|
||||
assert app_settings.API == False
|
||||
assert app_settings.API is False
|
||||
|
||||
assert app_settings.REDOC_URL is None
|
||||
assert app_settings.DOCS_URL is None
|
||||
|
@ -35,7 +35,6 @@ def test_secret_generation(tmp_path):
|
|||
assert determine_secrets(app_dirs.DATA_DIR, False) == "shh-secret-test-key"
|
||||
assert determine_secrets(app_dirs.DATA_DIR, True) != "shh-secret-test-key"
|
||||
|
||||
|
||||
assert determine_secrets(tmp_path, True) != "shh-secret-test-key"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue