def testPut404(self):
    self.mox.StubOutWithMock(uploadfile.main_common, 'SanitizeUUID')

    uuid = 'foouuid'
    mock_session = self.mox.CreateMockAnything()
    mock_session.uuid = uuid
    self.MockDoMunkiAuth(and_return=mock_session)
    uploadfile.main_common.SanitizeUUID(uuid).AndReturn(uuid)
    self.MockError(404)

    mock_session = self.mox.CreateMockAnything()
    mock_session.uuid = uuid
    self.MockDoMunkiAuth(and_return=mock_session)
    uploadfile.main_common.SanitizeUUID(uuid).AndReturn(uuid)
    self.MockError(404)

    self.mox.ReplayAll()
    self.c.put(file_type='log', file_name='')
    self.c.put(file_type='', file_name='fooname')
    self.mox.VerifyAll()
Tests UploadFile.put() with 404.
dataset/ETHPy150Open google/simian/src/tests/simian/mac/munki/handlers/uploadfile_test.py/UploadFileHandlerTest.testPut404