def test_not_enabled_sysegg(self): with mock.patch('subprocess.check_output', return_value='random string.alkjfdasdf') as output: enabled = build.is_sysegg_in_buildout() self.assertFalse(enabled) output.assert_called_with( ['bin/buildout', 'annotate'])
def test_enabled_sysegg(self): with mock.patch('subprocess.check_output', return_value='recipe= syseggrecipe\n') as output: enabled = build.is_sysegg_in_buildout() self.assertTrue(enabled) output.assert_called_with( ['bin/buildout', 'annotate'])