def test_store_is_called_with_correct_args(self): store = MagicMock() store.set = MagicMock() self.store.create(self.name) flag = FeatureFlag(self.name, store) flag.enable() store.set.assert_called_once_with(self.name, True)
def test_client_is_called_with_correct_args(self): client = MagicMock() flag = FeatureFlag(self.name, client) flag.enable() client.enable.assert_called_once_with(self.name)