Example #1
0
 def test_strict(self):
     for inp in (
         {"xanthium": 12},
         {12: "xanthium"},
         {"message": "Hello=World;greeting"},
     ):
         proxy.DBRecord(inp)
         self.assertRaises(ValueError, proxy.DBRecord, inp, strict=True)
 def test_basic(self):
     for input in {}, {"message": "hello"}:
         kbrec = proxy.DBRecord(input)
     kbrec = proxy.DBRecord({"message": "greeting;Hello=World"})
     self.assertEqual(kbrec.record['event'], 'greeting')
     self.assertEqual(kbrec.record['Hello'], 'World')
Example #3
0
 def test_basic(self):
     for input in {}, {"message": "hello"}:
         kbrec = proxy.DBRecord(input)
     kbrec = proxy.DBRecord({"message": "greeting;Hello=World"})
     self.assertEqual(kbrec.record["event"], "greeting")
     self.assertEqual(kbrec.record["Hello"], "World")