mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
chore: upgrade black (#19410)
This commit is contained in:
committed by
Ville Brofeldt
parent
1edd5f1343
commit
a70f4dc52f
@@ -40,13 +40,18 @@ NEW_VALUE = "new value"
|
||||
|
||||
|
||||
def test_upsert_id_entry(
|
||||
app_context: AppContext, admin: User, key_value_entry: KeyValueEntry,
|
||||
app_context: AppContext,
|
||||
admin: User,
|
||||
key_value_entry: KeyValueEntry,
|
||||
) -> None:
|
||||
from superset.key_value.commands.upsert import UpsertKeyValueCommand
|
||||
from superset.key_value.models import KeyValueEntry
|
||||
|
||||
key = UpsertKeyValueCommand(
|
||||
actor=admin, resource=RESOURCE, key=ID_KEY, value=NEW_VALUE,
|
||||
actor=admin,
|
||||
resource=RESOURCE,
|
||||
key=ID_KEY,
|
||||
value=NEW_VALUE,
|
||||
).run()
|
||||
assert key.id == ID_KEY
|
||||
entry = (
|
||||
@@ -57,13 +62,18 @@ def test_upsert_id_entry(
|
||||
|
||||
|
||||
def test_upsert_uuid_entry(
|
||||
app_context: AppContext, admin: User, key_value_entry: KeyValueEntry,
|
||||
app_context: AppContext,
|
||||
admin: User,
|
||||
key_value_entry: KeyValueEntry,
|
||||
) -> None:
|
||||
from superset.key_value.commands.upsert import UpsertKeyValueCommand
|
||||
from superset.key_value.models import KeyValueEntry
|
||||
|
||||
key = UpsertKeyValueCommand(
|
||||
actor=admin, resource=RESOURCE, key=UUID_KEY, value=NEW_VALUE,
|
||||
actor=admin,
|
||||
resource=RESOURCE,
|
||||
key=UUID_KEY,
|
||||
value=NEW_VALUE,
|
||||
).run()
|
||||
assert key.uuid == UUID_KEY
|
||||
entry = (
|
||||
@@ -78,7 +88,10 @@ def test_upsert_missing_entry(app_context: AppContext, admin: User) -> None:
|
||||
from superset.key_value.models import KeyValueEntry
|
||||
|
||||
key = UpsertKeyValueCommand(
|
||||
actor=admin, resource=RESOURCE, key=456, value=NEW_VALUE,
|
||||
actor=admin,
|
||||
resource=RESOURCE,
|
||||
key=456,
|
||||
value=NEW_VALUE,
|
||||
).run()
|
||||
assert key.id == 456
|
||||
db.session.query(KeyValueEntry).filter_by(id=456).delete()
|
||||
|
||||
Reference in New Issue
Block a user