def test_activities_by_period(self):

        # test_activities_by_period

        with open('tests/data/activities_v1.json', 'r') as file:
            response_body = json.loads(file.read())

        responses.add(
            responses.GET,
            re.compile(
                'https://demo-api.ig.com/gateway/deal/history/activity/.+'),
            match_querystring=False,
            headers={
                'CST': 'abc123',
                'X-SECURITY-TOKEN': 'xyz987'
            },
            json=response_body,
            status=200)

        ig_service = IGService('username', 'password', 'api_key', 'DEMO')
        result = ig_service.fetch_account_activity_by_period(10000000)

        # we expect a pd.DataFrame with 17 columns and 3 rows
        assert isinstance(result, pd.DataFrame)
        assert result.shape[0] == 3
        assert result.shape[1] == 17
 def test_fetch_account_activity_by_period(self, ig_service: IGService):
     response = ig_service.fetch_account_activity_by_period(10000)
     assert isinstance(response, pd.DataFrame)