

def test_strategy(self):

    @urlmatch(path='.*strategies/?$')
    def strategy_mock(url, request):
        return {
            'status_code': 200,
            'content': json.dumps([STRATEGY_DICT]),
        }
    with HTTMock(strategy_mock):
        strategies = self.client.strategies()
        self.assertEqual(len(strategies), 1)
        strategy = strategies[0]
        self.assertTrue(isinstance(strategy, tradewave.Strategy))
        for (key, value) in six.iteritems(STRATEGY_DICT):
            self.assertEqual(getattr(strategy, key), value)

dataset/ETHPy150Open tradewave/tradewave-python/tests/test_strategies.py StrategyTestCase.test_strategy/original