'Normal build in passing state'

def test_normal_execution(self):

    self.mocks.configure_mock('process', {'communicate.return_value': ('This    is    okay', '')})
    type(self.mocks.process).returncode = PropertyMock(return_value=0)
    build_env = LocalEnvironment(version=self.version, project=self.project, build={'id': DUMMY_BUILD_ID})
    with build_env:
        build_env.run('echo', 'test')
    self.assertTrue(self.mocks.process.communicate.called)
    self.assertTrue(build_env.done)
    self.assertTrue(build_env.successful)
    self.assertEqual(len(build_env.commands), 1)
    self.assertEqual(build_env.commands[0].output, u'This    is    okay')
    self.assertFalse(self.mocks.api()(DUMMY_BUILD_ID).put.called)
