Example #1
0
    def test_call_trade_provider(self, mocker):
        trade_provider_mock = mocker.Mock()

        epic = EpicFactory(trade_provider=trade_provider_mock)

        epic.open_trade(test="test")

        assert trade_provider_mock.open_trade.call_args_list == [call("my_new_trade")]
Example #2
0
    def test_call_open_trade(self, mocker, trade_open_from_epic_mock):
        trade_provider_mock = mocker.Mock()

        epic = EpicFactory(trade_provider=trade_provider_mock)

        epic.open_trade(test="test")

        assert trade_open_from_epic_mock.call_args_list == [
            call(epic=epic, test="test")
        ]
Example #3
0
    def test_response(self, mocker):
        trade_provider_mock = mocker.Mock()

        epic = EpicFactory(trade_provider=trade_provider_mock)

        response = epic.open_trade(test="test")

        assert response == "my_new_trade"