Browse Source

fix(api): tests: mock response had illegal body=None

This caused httpretty to raise an uncaught exception in a seperate thread,
which was then seen as 'RemoteDisconnected' exception in the main thread.
Nils Wisiol 6 năm trước cách đây
mục cha
commit
11723e8dd5
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      api/desecapi/tests/base.py

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

@@ -259,7 +259,7 @@ class MockPDNSTestCase(APITestCase):
             if not existing_domains or body['name'] in existing_domains:
             if not existing_domains or body['name'] in existing_domains:
                 return [422, response_headers, json.dumps({'error': 'Domain \'%s\' already exists' % body['name']})]
                 return [422, response_headers, json.dumps({'error': 'Domain \'%s\' already exists' % body['name']})]
             else:
             else:
-                return [200, response_headers, None]
+                return [200, response_headers, '']
 
 
         request = cls.request_pdns_zone_create_422()
         request = cls.request_pdns_zone_create_422()
         request['body'] = request_callback
         request['body'] = request_callback