def test_delete_entry_missing( app_context: AppContext, admin: User, key_value_entry: KeyValueEntry, ) -> None: from superset.key_value.commands.delete import DeleteKeyValueCommand from superset.key_value.models import KeyValueEntry assert DeleteKeyValueCommand(resource=RESOURCE, key=456).run() is False
def delete(self, key: str) -> Any: # pylint: disable=import-outside-toplevel from superset.key_value.commands.delete import DeleteKeyValueCommand return DeleteKeyValueCommand( resource=RESOURCE, key_type=KEY_TYPE, key=self.get_key(key), ).run()
def test_delete_uuid_entry( app_context: AppContext, admin: User, key_value_entry: KeyValueEntry, ) -> None: from superset.key_value.commands.delete import DeleteKeyValueCommand from superset.key_value.models import KeyValueEntry assert DeleteKeyValueCommand(resource=RESOURCE, key=UUID_KEY).run() is True