Browse Source

fix(tests): py3 utf8 strings

Nils Wisiol 8 years ago
parent
commit
f01b4be711
1 changed files with 1 additions and 1 deletions
  1. 1 1
      api/desecapi/tests/testdyndns12update.py

+ 1 - 1
api/desecapi/tests/testdyndns12update.py

@@ -28,7 +28,7 @@ class DynDNS12UpdateTest(APITestCase):
 
 
         self.username = response.data['name']
         self.username = response.data['name']
         self.password = self.token
         self.password = self.token
-        self.client.credentials(HTTP_AUTHORIZATION='Basic ' + base64.b64encode(self.username + ':' + self.password))
+        self.client.credentials(HTTP_AUTHORIZATION='Basic ' + base64.b64encode((self.username + ':' + self.password).encode()).decode())
 
 
     def assertIP(self, ipv4=None, ipv6=None):
     def assertIP(self, ipv4=None, ipv6=None):
         old_credentials = self.client._credentials['HTTP_AUTHORIZATION']
         old_credentials = self.client._credentials['HTTP_AUTHORIZATION']