def test_tips_audience(self): response = self.client.post( "/tips/gettips?audience=zakelijk", json=get_fixture_without_source_tips(optin=False), ) tips = response.get_json() self.assertEqual(len(tips), 5) response = self.client.post( "/tips/gettips?audience=persoonlijk", json=get_fixture_without_source_tips(optin=False), ) tips = response.get_json() self.assertEqual(len(tips), 5) response = self.client.post( "/tips/gettips?audience=zakelijk,persoonlijk", json=get_fixture_without_source_tips(optin=False), ) tips = response.get_json() self.assertEqual(len(tips), 10)
def get_client_data(self, optin=False): return get_tips_request_data(get_fixture_without_source_tips(optin))
def _get_client_data(self): return get_fixture_without_source_tips(optin=True)
def get_client_data(self): return get_tips_request_data(get_fixture_without_source_tips())