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
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()
"""
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)