Skip to content

Commit 2e6ef8a

Browse files
committed
Merge pull request #7 from Marx314/mock_and_post_readme
Rework test without flexmock, request_mock
2 parents d764652 + 6e8fece commit 2e6ef8a

15 files changed

+289
-328
lines changed

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ Ubersmith API Client for Python
44
.. image:: https://travis-ci.org/internap/python-ubersmithclient.svg?branch=master
55
:target: https://travis-ci.org/internap/python-ubersmithclient
66

7-
.. image:: https://img.shields.io/pypi/v/ubersmith_client.svg?style=flat
8-
:target: https://pypi.python.org/pypi/ubersmith_client
7+
.. image:: https://img.shields.io/pypi/v/python-ubersmithclient.svg?style=flat
8+
:target: https://pypi.python.org/pypi/python-ubersmithclient
99

1010
Usage
1111
-----
1212
.. code:: python
1313
1414
import ubersmith_client
1515
16-
api = ubersmith_client.api.init('http://ubersmith.com/api/2.0/', 'username', 'password')
16+
api = ubersmith_client.api.init(url='http://ubersmith.com/api/2.0/', user='username', password='password')
1717
api.client.count()
1818
>>> u'264'
1919
api.client.latest_client()
@@ -22,7 +22,7 @@ Usage
2222
API
2323
---------
2424

25-
**ubersmith_client.api.init(url, user, password, timeout, use_http_post)**
25+
**ubersmith_client.api.init(url, user, password, timeout, use_http_get)**
2626
:url:
2727
URL of your API
2828

@@ -33,7 +33,7 @@ API
3333
:timeout: api timeout given to requests
3434

3535
*Default:* ``60``
36-
:use_http_post:
37-
Use `POST` requests instead of `GET`
36+
:use_http_get:
37+
Use `GET` requests instead of `POST`
3838

3939
*Default:* ``False``

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
requests<=2.9.1
2-
six>=1.10.0

test-requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
nose==1.2.1
2-
requests-mock==0.7.0
32
pyhamcrest==1.8.1
4-
flexmock
3+
mock==1.3.0

tests/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,3 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
def apply_kwargs(kwargs, default_kwargs):
15-
for k, v in kwargs.items():
16-
if isinstance(v, dict):
17-
default_kwargs[k] = apply_kwargs(v, default_kwargs[k])
18-
else:
19-
default_kwargs[k] = v
20-
return default_kwargs

0 commit comments

Comments
 (0)