django-tenant-schemas icon indicating copy to clipboard operation
django-tenant-schemas copied to clipboard

Content-type argument is not used in TenantClient.delete

Open tartieret opened this issue 5 years ago • 0 comments

In test.client.TenantClient, the "content_type" argument for the delete function is not passed to super().delete. This prevents the use of a different content-type while testing:

def delete(self, path, data='', content_type='application/octet-stream',
               **extra):
        if 'HTTP_HOST' not in extra:
            extra['HTTP_HOST'] = self.tenant.domain_url
        return super(TenantClient, self).delete(path, data, **extra)

The correct function should be:

def delete(self, path, data='', **extra):
        if 'HTTP_HOST' not in extra:
            extra['HTTP_HOST'] = self.tenant.domain_url
        return super(TenantClient, self).delete(path, data, **extra)

tartieret avatar Jan 09 '20 20:01 tartieret