Exemple #1
0
 def test_data_dump_value(self):
     """Testing Data: Value from_dump()"""
     value = Data.from_dump("V|0|test|example|42.0|g")
     assert value.__class__.__name__ == "Value"
Exemple #2
0
 def test_data_malformed_event(self):
     """Testing Data: malformed event"""
     with self.assertRaises(ValueError):
         Data.from_dump("E|0")
Exemple #3
0
 def test_data_malformed_type(self):
     """Testing Data: malformed data type"""
     with self.assertRaises(ValueError):
         Data.from_dump("ZZ|0")
Exemple #4
0
 def test_data_malformed_value(self):
     """Testing Data: malformed value"""
     with self.assertRaises(ValueError):
         Data.from_dump("V|0")
Exemple #5
0
 def test_data_dump_event(self):
     """Testing Data: Event from_dump()"""
     event = Data.from_dump("E|0|test|example|2|message")
     assert event.__class__.__name__ == "Event"