Title: use unittest.mock instead of mock where possible · Issue #200 · python-smpplib/python-smpplib · GitHub
Open Graph Title: use unittest.mock instead of mock where possible · Issue #200 · python-smpplib/python-smpplib
X Title: use unittest.mock instead of mock where possible · Issue #200 · python-smpplib/python-smpplib
Description: Could you please allow to drop python-mock dependency if not needed? Following works for 3.8, 3.9 and 3.10 but obviously will not be usable for Python 2. diff -upr python-smpplib-2.2.1.orig/smpplib/tests/test_client.py python-smpplib-2.2...
Open Graph Description: Could you please allow to drop python-mock dependency if not needed? Following works for 3.8, 3.9 and 3.10 but obviously will not be usable for Python 2. diff -upr python-smpplib-2.2.1.orig/smpplib...
X Description: Could you please allow to drop python-mock dependency if not needed? Following works for 3.8, 3.9 and 3.10 but obviously will not be usable for Python 2. diff -upr python-smpplib-2.2.1.orig/smpplib...
Opengraph URL: https://github.com/python-smpplib/python-smpplib/issues/200
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"use unittest.mock instead of mock where possible","articleBody":"Could you please allow to drop python-mock dependency if not needed? Following works for 3.8, 3.9 and 3.10 but obviously will not be usable for Python 2.\r\n\r\n```\r\ndiff -upr python-smpplib-2.2.1.orig/smpplib/tests/test_client.py python-smpplib-2.2.1/smpplib/tests/test_client.py\r\n--- python-smpplib-2.2.1.orig/smpplib/tests/test_client.py\t2022-05-04 09:38:34.127959320 +0200\r\n+++ python-smpplib-2.2.1/smpplib/tests/test_client.py\t2022-05-04 09:38:34.147959444 +0200\r\n@@ -1,6 +1,6 @@\r\n import warnings\r\n import pytest\r\n-from mock import Mock, call\r\n+from unittest.mock import Mock, call\r\n \r\n from smpplib.client import Client\r\n from smpplib.smpp import make_pdu\r\ndiff -upr python-smpplib-2.2.1.orig/smpplib/tests/test_gsm.py python-smpplib-2.2.1/smpplib/tests/test_gsm.py\r\n--- python-smpplib-2.2.1.orig/smpplib/tests/test_gsm.py\t2022-05-04 09:38:34.127959320 +0200\r\n+++ python-smpplib-2.2.1/smpplib/tests/test_gsm.py\t2022-05-04 09:38:34.147959444 +0200\r\n@@ -1,6 +1,6 @@\r\n # -*- coding: utf8 -*-\r\n \r\n-import mock\r\n+from unittest import mock\r\n from pytest import mark, raises\r\n \r\n from smpplib import consts\r\n```\r\n","author":{"url":"https://github.com/pgajdos","@type":"Person","name":"pgajdos"},"datePublished":"2022-05-04T07:53:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/200/python-smpplib/issues/200"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6873604a-1d20-1fbd-79cc-3930bd70df83 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 884C:3AE483:B6FCA3:103E87E:696F6728 |
| html-safe-nonce | cb110fc55b7e9fa66e0632ebe48b9ac7e421ea09745f0accc130b84718e29129 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODRDOjNBRTQ4MzpCNkZDQTM6MTAzRTg3RTo2OTZGNjcyOCIsInZpc2l0b3JfaWQiOiI3MjAxNDc4Njc2MDgyMjg4NDI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b514f85476d70380016eebbab42ce71b7405ccb35a5295f937c8d56c0919e7cb |
| hovercard-subject-tag | issue:1225033654 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-smpplib/python-smpplib/200/issue_layout |
| twitter:image | https://opengraph.githubassets.com/987148b3a911f258951a750280bdf35228ab3cd112a634fae1590599319f9725/python-smpplib/python-smpplib/issues/200 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/987148b3a911f258951a750280bdf35228ab3cd112a634fae1590599319f9725/python-smpplib/python-smpplib/issues/200 |
| og:image:alt | Could you please allow to drop python-mock dependency if not needed? Following works for 3.8, 3.9 and 3.10 but obviously will not be usable for Python 2. diff -upr python-smpplib-2.2.1.orig/smpplib... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pgajdos |
| hostname | github.com |
| expected-hostname | github.com |
| None | dd6be7b30d2e12704d0d9723ad4a7950f9e3ad8461efc40b5411aad62e847a89 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-smpplib/python-smpplib git https://github.com/python-smpplib/python-smpplib.git |
| octolytics-dimension-user_id | 45378833 |
| octolytics-dimension-user_login | python-smpplib |
| octolytics-dimension-repository_id | 9441405 |
| octolytics-dimension-repository_nwo | python-smpplib/python-smpplib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9441405 |
| octolytics-dimension-repository_network_root_nwo | python-smpplib/python-smpplib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0bab932a9532ed9bc2e3e2614af9348ab39af6a7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width