def test_none(self, check_output): check_output.side_effect = CalledProcessError(None, None) self.assertEqual(scm.get_rev(), None)
def test_ok(self, check_output): check_output.return_value = "abcdefgh\n" self.assertEqual(scm.get_rev(), "abcdefgh")