'Not a multipart upload.'

def test_resumable_media_fail_unknown_response_code_subsequent_request(self):

    self.http = HttpMock(datafile('zoo.json'), {'status': '200'})
    zoo = build('zoo', 'v1', http=self.http)
    media_upload = MediaFileUpload(datafile('small.png'), resumable=True)
    request = zoo.animals().insert(media_body=media_upload, body=None)
    http = HttpMockSequence([({'status': '200', 'location': 'http://upload.example.com'}, ''), ({'status': '400'}, '')])
    self.assertRaises(HttpError, request.execute, http=http)
    self.assertTrue(request._in_error_state)
    http = HttpMockSequence([({'status': '308', 'range': '0-5'}, ''), ({'status': '308', 'range': '0-6'}, '')])
    (status, body) = request.next_chunk(http=http)
    self.assertEquals(status.resumable_progress, 7, 'Should    have    first    checked    length    and    then    tried    to    PUT    more.')
    self.assertFalse(request._in_error_state)
    http = HttpMockSequence([({'status': '400'}, '')])
    self.assertRaises(HttpError, request.execute, http=http)
    self.assertTrue(request._in_error_state)
    http = HttpMockSequence([({'status': '200'}, '{"foo":    "bar"}')])
    (status, body) = request.next_chunk(http=http)
    self.assertEqual(body, {'foo': 'bar'})
