Пример #1
0
    def test_sleep(self, msleep):
        self.builder = serve._Builder(self.fake_app, 'blog/_config.yml',  42)

        with mock.patch.object(
                type(self.builder), '_quit',
                mock.PropertyMock(side_effect=[False, True]),
                create=True):
            self.builder.run()

        msleep.assert_called_once_with(42)
Пример #2
0
 def setUp(self):
     self.fake_app = mock.Mock(spec=Holocron)
     self.builder = serve._Builder(self.fake_app, 'blog/_config.yml',  0)