Exemplo n.º 1
0
 def auth_username(self, username):
     self.__auth_username = Parser.coerce_string_to_ascii(username)
Exemplo n.º 2
0
 def auth_password(self, password):
     self.__auth_password = Parser.coerce_string_to_ascii(password)
Exemplo 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'))