瀏覽代碼

fix(tests): py3 utf8 strings

Nils Wisiol 8 年之前
父節點
當前提交
f01b4be711
共有 1 個文件被更改,包括 1 次插入1 次删除
  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.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):
         old_credentials = self.client._credentials['HTTP_AUTHORIZATION']