def test_other_fields_not_passed_through(self, m_helper): """Only relevant fields are passed through.""" mycfg = self.base_cfg.copy() mycfg["unrelated_field"] = "unrelated" DataSourceMAAS.get_oauth_helper(mycfg) m_helper.assert_has_calls([mock.call(**self.base_cfg)])
def test_other_fields_not_passed_through(self, m_helper): """Only relevant fields are passed through.""" mycfg = self.base_cfg.copy() mycfg['unrelated_field'] = 'unrelated' DataSourceMAAS.get_oauth_helper(mycfg) m_helper.assert_has_calls([mock.call(**self.base_cfg)])
def test_all_required(self, m_helper): """Valid config as expected.""" DataSourceMAAS.get_oauth_helper(self.base_cfg.copy()) m_helper.assert_has_calls([mock.call(**self.base_cfg)])
def test_all_required(self, m_helper): """Valid config as expected.""" DataSourceMAAS.get_oauth_helper(self.base_cfg.copy()) m_helper.assert_has_calls([mock.call(**self.base_cfg)])