Ejemplo n.º 1
0
    def test_market_type_result(self):
        mock_response = create_mock_json('tests/resources/list_market_types.json')
        market_type_results = mock_response.json().get('result')

        for market_type_result in market_type_results:
            resource = resources.MarketTypeResult(date_time_sent=self.DATE_TIME_SENT,
                                                  **market_type_result)

            assert resource._datetime_sent == self.DATE_TIME_SENT
            assert resource.market_count == market_type_result['marketCount']
            assert resource.market_type == market_type_result['marketType']
    def test_market_type_result(self):
        mock_response = create_mock_json('tests/resources/list_market_types.json')
        market_type_results = mock_response.json().get('result')

        for market_type_result in market_type_results:
            resource = resources.MarketTypeResult(elapsed_time=self.ELAPSED_TIME,
                                                  **market_type_result)

            assert resource.elapsed_time == self.ELAPSED_TIME
            assert resource.market_count == market_type_result['marketCount']
            assert resource.market_type == market_type_result['marketType']