Esempio n. 1
0
 def testnoneToString(self):
     self.assertEqual(HTTPShared.noneToString(None), "", "None must be converted to string.")
     self.assertEqual(HTTPShared.noneToString("34"), "34", "String must be converted to string.")
     self.assertEqual(HTTPShared.noneToString(34), "34", "Int must be converted to string.")
     self.assertEqual(HTTPShared.noneToString([34, "44"]), ["34", "44"], "List must be converted to list of strings.")
     self.assertEqual(HTTPShared.noneToString(("34", None, 15, "ff")), ("34", "", "15", "ff"), "Tuple must be converted to tuple strings.")
     pass
Esempio n. 2
0
 def testnoneToString(self):
     self.assertEqual(HTTPShared.noneToString(None), "",
                      "None must be converted to string.")
     self.assertEqual(HTTPShared.noneToString("34"), "34",
                      "String must be converted to string.")
     self.assertEqual(HTTPShared.noneToString(34), "34",
                      "Int must be converted to string.")
     self.assertEqual(HTTPShared.noneToString([34, "44"]), ["34", "44"],
                      "List must be converted to list of strings.")
     self.assertEqual(HTTPShared.noneToString(
         ("34", None, 15, "ff")), ("34", "", "15", "ff"),
                      "Tuple must be converted to tuple strings.")
     pass