Пример #1
0
    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)
Пример #2
0
    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)