Skip to content

CONT-133: add support for political contributions#114

Merged
MarkusH merged 4 commits intodevelopfrom
feature/CONT-133_political-contributions
Mar 12, 2018
Merged

CONT-133: add support for political contributions#114
MarkusH merged 4 commits intodevelopfrom
feature/CONT-133_political-contributions

Conversation

@kamni
Copy link
Copy Markdown
Contributor

@kamni kamni commented Mar 8, 2018

This adds support for political contributions to the laterpay python client. Political contributions add an election_id as a new parameter, in addition to the new API endpoints.

@kamni kamni added the WIP label Mar 8, 2018
Comment thread tests/test_client.py Outdated
url = self.lp.get_buy_url(item)
self.assertTrue(url.startswith('https://web.laterpay.net/dialog/contribute/pay_now?'))
self.assertQueryString(url, 'campaign_id', value='2')
self.assertQueryString(url, 'campaign_id', value='save-the-world')
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'save-the-world' is the correct value. However, the tests pass, regardless of what the value is here. Something isn't right.

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 8, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 74dc0b2 on feature/CONT-133_political-contributions into d432081 on develop.

@kamni kamni added ReadyForReview and removed WIP labels Mar 8, 2018
@kamni kamni requested a review from MarkusH March 8, 2018 14:25
Copy link
Copy Markdown
Contributor

@MarkusH MarkusH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor change I'm going to make. Otherwise LGTM.

Comment thread laterpay/__init__.py Outdated

def __init__(self, item_id, pricing, url, title, expiry=None, sub_id=None, period=None, item_type=None):
def __init__(self, item_id, pricing, url, title, expiry=None, sub_id=None,
period=None, election_id=None, item_type=None):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm moving election_id to the end to preserve the ordering of the existing parameters. Even if they are all named arguments.

@MarkusH MarkusH force-pushed the feature/CONT-133_political-contributions branch from 9ee2a8f to 8b0f2a0 Compare March 12, 2018 13:44
@MarkusH MarkusH force-pushed the feature/CONT-133_political-contributions branch from 8b0f2a0 to 74dc0b2 Compare March 12, 2018 13:44
Copy link
Copy Markdown
Contributor

@MarkusH MarkusH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending #115

@MarkusH MarkusH added Blocked and removed Blocked labels Mar 12, 2018
@MarkusH MarkusH merged commit 4176fb3 into develop Mar 12, 2018
@MarkusH MarkusH deleted the feature/CONT-133_political-contributions branch March 12, 2018 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants