Test lookup of non-existent key
(name)
| 271 | results.ok("bulk upsert (100 items, sampled)") |
| 272 | |
| 273 | def test_key_not_found(name): |
| 274 | """Test lookup of non-existent key""" |
| 275 | print("\n[Test: Key Not Found]") |
| 276 | |
| 277 | try: |
| 278 | lookup(name, "nonexistent_key_xyz_123") |
| 279 | results.fail("nonexistent key", "exception", "no exception") |
| 280 | except Exception as e: |
| 281 | if "not found" in str(e).lower() or "404" in str(e) or "Failed" in str(e): |
| 282 | results.ok("nonexistent key raises exception") |
| 283 | else: |
| 284 | results.ok(f"nonexistent key raises exception: {e}") |
| 285 | |
| 286 | def test_transaction_abort(name): |
| 287 | """Test that aborted transactions don't persist""" |