This is an automated email from the ASF dual-hosted git repository.

sadpandajoe pushed a commit to branch ultraset-key-value-dao-entry-uuid-mismatch
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 66867c9e70204e8c3293721d9a22c1718971def4
Author: Joe Li <[email protected]>
AuthorDate: Sat Oct 10 14:15:37 2026 +0000

    fix(tests): narrow nullable uuid before passing it to KeyValueDAO.get_entry
    
    test_get_entry_shared_lock (added in #45102) passes key_value_entry.uuid
    directly to get_entry, whose key parameter is typed int | UUID, not
    Optional. uuid is UUID | None on the model, so mypy flags the call.
    Add the same assert-not-None narrowing already used three tests above
    in test_get_uuid_entry.
---
 tests/unit_tests/dao/key_value_test.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/unit_tests/dao/key_value_test.py 
b/tests/unit_tests/dao/key_value_test.py
index b93b0c455c0..2c8162cdb47 100644
--- a/tests/unit_tests/dao/key_value_test.py
+++ b/tests/unit_tests/dao/key_value_test.py
@@ -210,6 +210,7 @@ def test_get_entry_shared_lock(
         queries.append(self)
         return original_first(self)
 
+    assert key_value_entry.uuid is not None
     with patch.object(Query, "first", capture_first):
         found_entry = KeyValueDAO.get_entry(
             resource=RESOURCE,

Reply via email to