-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from oscaro/feature/error-notifications
Cleanup tests, add support for error and pending payment statuses
- Loading branch information
Showing
10 changed files
with
519 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from copy import deepcopy | ||
|
||
|
||
class MockRequest: | ||
|
||
def __init__(self, data=None, method='GET', remote_address='127.0.0.1'): | ||
self.method = method | ||
self.META = {} | ||
|
||
if method == 'GET': | ||
self.GET = deepcopy(data) or {} | ||
elif method == 'POST': | ||
self.POST = deepcopy(data) or {} | ||
|
||
# Most tests use unproxied requests, the case of proxied ones | ||
# is unit-tested by the `test_get_origin_ip_address` method. | ||
if remote_address is not None: | ||
self.META['REMOTE_ADDR'] = remote_address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.