-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing problem with invalid dates for subscription events (#77)
* Fixing problem with invalid dates for subscription events * String --> DateTime. Update unit tests to match expected results. Add VCR. Downgrade to specific VCR package version * Remove BIN file * Don't break test CI for forks (#78) * Try continue-on-error * Fixate urllib3 * Remove the debug exit * Fixing inting errors * Bump vcrpy package version to test if we resolve CI error: module 'collections' has no attribute 'MutableMapping' * List vcrpy version in requirements.txt to try and resolve CI error: module 'collections' has no attribute 'MutableMapping' * vcrpy version * urllib3 version --------- Co-authored-by: polis80cy <[email protected]> Co-authored-by: Petr Kopac <[email protected]>
- Loading branch information
1 parent
bb9658e
commit 8514ba4
Showing
12 changed files
with
221 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '3.1.1' | ||
__version__ = '3.1.2' |
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,78 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- chartmogul-python/3.1.2 | ||
content-type: | ||
- application/json | ||
method: GET | ||
uri: https://api.chartmogul.com/v1/subscription_events | ||
response: | ||
body: | ||
string: !!binary | | ||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DcvT+RMLuMZtstgZAfX4JALsQEuyVEqk+X8RMHFE+VuPdfL+TJ | ||
l6AcCzGFSmRbpLt2xrmXQ0jMbmj3CQ1MHJbj5SYOj76EnOI/jktRoicSc04c0JMvATGXdIIVx1an | ||
cZqNV4lH24wLbUIDKmFjFlMJ6GkHDSGSsAmQwLu3bONQSzyRuHsRCj2tOIyhjRkwv25HXyLfpCfq | ||
oBKPthkX/sbOyz5mOZXwteKQUoAJ3Euc0wt2WIQOIDG7e/mQSHx/CQqlI3MKJSjNGZUwV+asyN/H | ||
fKABpKrVqf+w37C3UemxVv0n/56cka8QralYQ/oNY2sRVtHWnIcxCxh91OZ4T/fWLH8I4p+ffwGd | ||
9Me3YzQAAA== | ||
headers: | ||
Access-Control-Allow-Credentials: | ||
- 'true' | ||
Cache-Control: | ||
- max-age=0, private, must-revalidate | ||
Connection: | ||
- keep-alive | ||
Content-Encoding: | ||
- gzip | ||
Content-Length: | ||
- '1033' | ||
Content-Type: | ||
- application/json; charset=utf-8 | ||
Date: | ||
- Fri, 19 May 2023 12:58:15 GMT | ||
ETag: | ||
- W/"81eb5df6ece395240b6951a8223b5f5d" | ||
Referrer-Policy: | ||
- strict-origin-when-cross-origin | ||
Vary: | ||
- Accept-Encoding | ||
- Accept-Encoding | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Download-Options: | ||
- noopen | ||
X-Frame-Options: | ||
- DENY | ||
X-Permitted-Cross-Domain-Policies: | ||
- none | ||
X-Request-Id: | ||
- 7ac6e671676b1fe526cf0c67d988f7b1 | ||
X-Runtime: | ||
- '0.128295' | ||
X-XSS-Protection: | ||
- 1; mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
yarl | ||
mock>=1.0.1 | ||
requests-mock>=1.3.0 | ||
vcrpy>=1.11.1 | ||
vcrpy<3.0.0 | ||
PyYAML>=5.1.2 | ||
httpretty>=0.9.6 | ||
wrapt>=1.11.2 |
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ promise>=1.0.1 | |
marshmallow>=3.10.0 | ||
future>=0.18.3 | ||
urllib3<2.0 | ||
vcrpy<=4.0.0 |
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,34 @@ | ||
interactions: | ||
- request: | ||
body: '{}' | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '2' | ||
User-Agent: | ||
- chartmogul-python/3.1.1 | ||
content-type: | ||
- application/json | ||
method: POST | ||
uri: https://api.chartmogul.com/v1/data_sources | ||
response: | ||
body: | ||
string: '{"code":400,"message":"Parameter \"name\" is missing","param":"name"}' | ||
headers: | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '69' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Fri, 19 May 2023 09:41:27 GMT | ||
status: | ||
code: 400 | ||
message: Bad Request | ||
version: 1 |
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,78 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- chartmogul-python/3.1.1 | ||
content-type: | ||
- application/json | ||
method: GET | ||
uri: https://api.chartmogul.com/v1/subscription_events | ||
response: | ||
body: | ||
string: !!binary | | ||
H4sIAAAAAAAAA+2b35KiOBTG34Xrdir/Q3yOvtqtKQohqCBIQ7B1uvrdNwlbu+vUjoyEgF1llTfK | ||
IR6Sn19OPpOPoO02bdLsa7U/VpE8yUq1wfrPj2CfBmtMuUAhJuglSGMVR+2xaxIZdZ25GKRtJDDM | ||
oIjRKuFptoJQpquNhGKVbTiPM0bTOBXBS5B0rTqWsonkWcmmig+RbYBDATjU169yaKW6jqu6w+Gn | ||
mOt2ENn94Fi3Ux9i/Qz//Y7+XvtYkX4EqdNGAOEVoCvIXwFbI7BG/A99r8wymaj9Sf4cB/ArAGv7 | ||
snGmiyJ1qU1bV4kncZXIw0GmprX/SaJpjo3u249P3SGN1MmkUax+nVBXm4Rvx7x1caX26hKs+wdN | ||
uqaRVfLP+7g8djrbfRUl/cD2YSo+R7+41EjVxIn53r7TzECZmz5frpGAfpCAIQPMDOVVz96PRFGU | ||
bcifSJjf3lxIAD9IIEghYO5I5Hm2u7TjkWCPphI2oQGVsDGLqQQWfpAgVCAKJkCCKtbsvCGBZp84 | ||
vgASoR8kYIi40XvHeWP7g2EXkaC3RWJ+ImxCAyJhY5YTCe6HCIY4Qab6dEUiqbdnh+ryiYRZUfSF | ||
529Wl5j5QYIjxqeYNzhP6109ft4gj6YSNqEBlbAxy6kE9YMEo1QLhbtK7JqShrk3JOZfg34BJIgf | ||
JCAmHLkTQRBNqst4IvBtkZifCJvQgEjYmOVEAvshgmGO8ASuBKXFJjH20Eij6onE/aUE8oQEAeEU | ||
SOTVe/ZGxiOBHk0lbEIDKmFjllMJT94l1j4VN0PpuOAg7yxNHUqJJxL3q4Qn75ICqN1LdyQyFjIU | ||
jlcJ+GgqYRMaUAkbs5hKIE9GFcOE4AmQwOWZnR1qiQEk5neqvgASnmwJhqmAEzhVOS7etg4qAW6r | ||
xPxI2IQGVMLGLKcSnmwJHGIAzVA61hL5e1kIB6fqicTdtQTyZEtgbVXhCcrLrMhFqUbXElA8mEr0 | ||
Cd1WiT5mOZXw5EsQvTmHTYBEiMTu/YmE3mU0224JhPz4EgTyMJxgt0SYqdNl/MQBw6dK3PuvF/Lk | ||
S1COw3AKlci3SJl2xrmXQ0jMbmj3CQ1MHJbj5SYOj76EmOI/jktZoScSc04c0JMvATEXdIIVx1Zl | ||
SZaPV4lH24wLbUIDKmFjFlMJ6GkHDSGCsAmQwLu3fONQSzyRuHsRCj2tOLShjRnQv25HX6LYZCfq | ||
oBKPthkX/sbOyz5mOZXwteIQIgQTuJe4oBfssAgdQGJ29/Ihkfj+EpRSxfoUSlDpMypRIfVZkb+P | ||
+UANSN3IU/9hv2FvI7NjI/tP/j05I14hXgO8JvgbR9YPquOtPg+jFzDqqPTxHvNWL38I4p+ffwES | ||
uS0yYzQAAA== | ||
headers: | ||
Access-Control-Allow-Credentials: | ||
- 'true' | ||
Cache-Control: | ||
- max-age=0, private, must-revalidate | ||
Connection: | ||
- keep-alive | ||
Content-Encoding: | ||
- gzip | ||
Content-Length: | ||
- '1033' | ||
Content-Type: | ||
- application/json; charset=utf-8 | ||
Date: | ||
- Fri, 19 May 2023 13:03:43 GMT | ||
ETag: | ||
- W/"605f65f25551e36f294b1276648844b4" | ||
Referrer-Policy: | ||
- strict-origin-when-cross-origin | ||
Vary: | ||
- Accept-Encoding | ||
- Accept-Encoding | ||
X-Content-Type-Options: | ||
- nosniff | ||
X-Download-Options: | ||
- noopen | ||
X-Frame-Options: | ||
- DENY | ||
X-Permitted-Cross-Domain-Policies: | ||
- none | ||
X-Request-Id: | ||
- 4549e2f044e141372f3e09f1bf571314 | ||
X-Runtime: | ||
- '0.052033' | ||
X-XSS-Protection: | ||
- 1; mode=block | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
import unittest | ||
import vcr | ||
from chartmogul import Config, SubscriptionEvent | ||
|
||
config = Config(api_key = '-') | ||
|
||
class FetchSubscriptionEventsTestCase(unittest.TestCase): | ||
""" | ||
Tests errors & user mistakes. | ||
""" | ||
@vcr.use_cassette('fixtures/fetch_subscription_events.yaml', filter_headers=['authorization']) | ||
def test_subscription_events(self): | ||
result = SubscriptionEvent.all(config).get() |