'Ensure POSTing JSON over basic auth with incorrectly padded Base64 string is handled correctly'

def test_regression_handle_bad_base64_basic_auth_header(self):

    auth = u'Basic    =a='
    response = self.csrf_client.post(u'/basic/', {u'example': u'example'}, format=u'json', HTTP_AUTHORIZATION=auth)
    assert (response.status_code == status.HTTP_401_UNAUTHORIZED)
