Beispiel #1
0
 def test_validate_raises_error_on_failure(self):
     client, _ = make_client_mocks("get_fields", "FAKE FIELD")
     mock_query(client, "get_groups", None)
     campaign = FollowupCampaign("Boop Group", "date_of_boop")
     with pytest.raises(ValueError,
                        match="Unable to find RapidPro group 'Boop Group'"):
         campaign.validate(client)
Beispiel #2
0
 def test_validate_works(self):
     client, _ = make_client_mocks("get_fields", "FAKE FIELD")
     mock_query(client, "get_groups", "FAKE GROUP")
     campaign = FollowupCampaign("Boop Group", "date_of_boop")
     campaign.validate(client)
 def test_validate_works(self):
     client, _ = make_client_mocks('get_fields', "FAKE FIELD")
     mock_query(client, 'get_groups', "FAKE GROUP")
     campaign = FollowupCampaign('Boop Group', 'date_of_boop')
     campaign.validate(client)