def test_handle_not_found(self): """Validate exception when lookup cannot be resolved.""" query = "NOT_VALID" with self.assertRaises(ValueError): VarLookup.handle(query, context=None, variables=VARIABLES)
def test_handle_false_result(self): """Validate that a bool value of False can be resolved.""" query = "false_val" result = VarLookup.handle(query, context=None, variables=VARIABLES) self.assertFalse(result)
def test_handle(self): """Validate handle base functionality.""" query = "str_val" result = VarLookup.handle(query, context=None, variables=VARIABLES) self.assertEqual(result, "test")
def test_handle_not_found(self, runway_context: MockRunwayContext) -> None: """Validate exception when lookup cannot be resolved.""" with pytest.raises(ValueError): VarLookup.handle("NOT_VALID", context=runway_context, variables=VARIABLES)
def test_handle_false_result(self, runway_context: MockRunwayContext) -> None: """Validate that a bool value of False can be resolved.""" assert not VarLookup.handle( "false_val", context=runway_context, variables=VARIABLES )
def test_handle(self, runway_context: MockRunwayContext) -> None: """Validate handle base functionality.""" assert ( VarLookup.handle("str_val", context=runway_context, variables=VARIABLES) == "test" )