Exemplo n.º 1
0
 def test_tracestate_add_invalid(self):
     state = TraceState()
     new_state = state.add("%%%nsasa", "val")
     self.assertEqual(len(new_state), 0)
     new_state = new_state.add("key", "====val====")
     self.assertEqual(len(new_state), 0)
     self.assertEqual(new_state.to_header(), "")
Exemplo n.º 2
0
 def test_tracestate_add_valid(self):
     state = TraceState()
     new_state = state.add("1a-2f@foo", "bar4")
     self.assertEqual(len(new_state), 1)
     self.assertEqual(new_state.get("1a-2f@foo"), "bar4")