Ejemplo n.º 1
0
 def test_from_dict_error(self):
     d = dict(
         literal="reason for examination",
         category="INDICATION",
         rule="FORWARD",
         invalid="this is an invalid key",
     )
     with pytest.raises(ValueError):
         ConTextItem.from_dict(d)
Ejemplo n.º 2
0
 def test_from_dict(self):
     d = dict(literal="reason for examination",
              category="INDICATION",
              rule="FORWARD")
     assert ConTextItem.from_dict(d)