@override_settings(IOS_NOTIFICATIONS_AUTHENTICATION='AuthBasic')
    def test_basic_authorization_request_invalid_credentials(self):
        user_pass = '%s:%s' % (self.user.username, 'invalidpassword')
        auth_header = 'Basic %s' % user_pass.encode('base64')
        url = reverse('ios-notifications-device-create')
        resp = self.client.get(url, HTTP_AUTHORIZATION=auth_header)
        self.assertEquals(resp.status_code, 401)
        self.assertTrue('authentication error' in resp.content)
dataset/ETHPy150Open stephenmuss/django-ios-notifications/ios_notifications/tests.py/AuthenticationDecoratorTestAuthBasic.test_basic_authorization_request_invalid_credentials/original