Fixed #61 : SheerkaDebugManager: Add get_value()
Fixed #60 : Hash error when ReturnValue is a list of list Fixed #59 : Implement smart_get() Fixed #58 : SheerkaPromptCompleter: Cannot parse concept token Fixed #57 : SheerkaPrompt: Add concept autocompletion Fixed #56 : automatically backup command Fixed #54 : I can record execution status Fixed #53 : ConceptManager: modify_concept fails
This commit is contained in:
@@ -15,3 +15,15 @@ class TestSheerkaHasAManager(TestUsingMemoryBasedSheerka):
|
||||
|
||||
# check that the definition of the concept has been updated
|
||||
assert sheerka.hasa(sheerka.new("king"), kingdom)
|
||||
|
||||
def test_i_cannot_set_the_same_attribute_twice(self):
|
||||
sheerka, context, king, kingdom = self.init_concepts("king", "kingdom")
|
||||
|
||||
sheerka.set_hasa(context, sheerka.new("king"), kingdom)
|
||||
res = sheerka.set_hasa(context, sheerka.new("king"), kingdom)
|
||||
|
||||
assert not res.status
|
||||
assert sheerka.isinstance(res.body, BuiltinConcepts.PROPERTY_ALREADY_DEFINED)
|
||||
assert res.body.property_name == BuiltinConcepts.HASA
|
||||
assert res.body.property_value == kingdom
|
||||
assert res.body.concept == sheerka.new("king")
|
||||
|
||||
Reference in New Issue
Block a user