From: Marek Marecki Date: Thu, 21 Mar 2013 21:07:31 +0000 (+0100) Subject: Removed `Client()` class from `diaspy/__init__.py` X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=00f28e10aa1dec75049ede8de9fa82bf3d3ed1dd;p=diaspy.git Removed `Client()` class from `diaspy/__init__.py` --- diff --git a/diaspy/__init__.py b/diaspy/__init__.py index f05ce40..d6c47eb 100644 --- a/diaspy/__init__.py +++ b/diaspy/__init__.py @@ -2,17 +2,3 @@ import diaspy.client import diaspy.models import diaspy.conversations -class Client(diaspy.client.Client): - """Class created for easier imports of client. - Instead of: - - import diaspy - client = diaspy.client.Client(...) - - you can simply use: - - import diaspy - client = diaspy.Client(...) - - """ - pass diff --git a/manual/connecting_to_pod.mdown b/manual/connecting_to_pod.mdown index f8a0cff..93267bb 100644 --- a/manual/connecting_to_pod.mdown +++ b/manual/connecting_to_pod.mdown @@ -4,6 +4,8 @@ First thing you have to do is to create new instace of `Client()`. Then, if no errors are raised, you can `_login()` to the pod with given username and password. + import diaspy + client = diaspy.Client(pod="http://pod.example.com/", username="foo", password="bar") client._login() diff --git a/tests.py b/tests.py index 2570f29..8cca369 100644 --- a/tests.py +++ b/tests.py @@ -19,7 +19,7 @@ class ClientTests(unittest.TestCase): """ This test checks initialization of Client() instance. """ - client = diaspy.Client(pod=__pod__, username='testuser', password='testpassword') + client = diaspy.client.Client(pod=__pod__, username='testuser', password='testpassword') self.assertEqual(__pod__, client.pod) self.assertEqual('testuser', client._username) self.assertEqual('testpassword', client._password)