Ejemplo n.º 1
0
 def __missing__(self, key) -> Slot:
     value = self[key] = Slot(key)
     return value
Ejemplo n.º 2
0
 def test_has_a_type_name(self):
     slot = self.create_slot(influence_conversation=True)
     assert slot.type_name is not None
     assert type(slot) == Slot.resolve_by_type(slot.type_name)
Ejemplo n.º 3
0
 def __missing__(self, key: Text) -> Slot:
     value = self[key] = Slot(key, mappings=[])
     return value
Ejemplo n.º 4
0
def test_raises_on_invalid_slot_type():
    with pytest.raises(InvalidSlotTypeException):
        Slot.resolve_by_type("foobar")
Ejemplo n.º 5
0
 def test_has_a_type_name(self):
     slot = self.create_slot()
     assert slot.type_name is not None
     assert type(slot) == Slot.resolve_by_type(slot.type_name)