Exemple #1
0
 def test_have_all_fields(self) -> None:
     self.assertEqual(split_key("type data cmt"), ["type", "data", "cmt"])
Exemple #2
0
 def test_missing_comment(self) -> None:
     self.assertEqual(split_key("type   data  "), ["type", "data", ""])
Exemple #3
0
 def test_missing_data_and_comment(self) -> None:
     with self.assertRaises(ServerError):
         split_key("type")
Exemple #4
0
 def test_excessive_fields(self) -> None:
     with self.assertRaises(ServerError):
         split_key("type data comment xyz")
Exemple #5
0
 def test_empty(self) -> None:
     with self.assertRaises(ServerError):
         split_key("")