def test_sanity_check_unconfigured(self, lmock, cfgmock): cfgmock.return_value = {'assume_provider': True, 'domain': ''} self.assertFalse(common.sanity_check())
def test_sanity_check_configured(self, lmock, cfgmock): cfgmock.return_value = {'assume_provider': True, 'domain': 'example.com'} self.assertTrue(common.sanity_check()) cfgmock.assert_called_once(common.sanity_check())