Esempio n. 1
0
 def auth_username(self, username):
     self.__auth_username = Parser.coerce_string_to_ascii(username)
Esempio n. 2
0
 def auth_password(self, password):
     self.__auth_password = Parser.coerce_string_to_ascii(password)
Esempio n. 3
0
 def test_coerce_string_to_ascii(self):
     result = Parser.coerce_string_to_ascii(bytes("Hello", 'utf-8'))
     self.assertEqual(result, "Hello".encode('ascii'))