Conversation
Co-Authored-By: Rahmat Hidayat <rahmatramahidayat@gmail.com>
clients/python/.gitignore
Outdated
| __pypackages__/ | ||
|
|
||
| # Celery stuff | ||
| celerybeat-schedule |
There was a problem hiding this comment.
Did you copy this from somewhere else @prakharmathur82 ?
There was a problem hiding this comment.
it must have been from some project, removed this, and added gitignore from https://github.com/github/gitignore/blob/main/Python.gitignore
clients/python/requirements.txt
Outdated
| protobuf==3.17.3 | ||
| pytest==6.0.1 | ||
| pytest-cov==2.12.1 | ||
| mock==4.0.3 |
There was a problem hiding this comment.
use unittest.mock instead.
| self._scheduler = Scheduler() | ||
| if self._auto_refresh: | ||
| self._scheduler.every(self._interval).seconds.do(self.refresh) | ||
| #TODO: check whether scheduler executed immediatelly or not |
There was a problem hiding this comment.
When are we going to test this ?
There was a problem hiding this comment.
checked it, it starts after 1st schedule
clients/python/README.md
Outdated
|
|
||
| Use `pip` | ||
| ``` | ||
| pip3 install stencil-python-client |
There was a problem hiding this comment.
Should we update this to use the git based method for downloading ?
| @@ -0,0 +1,30 @@ | |||
| from .store import Store | |||
There was a problem hiding this comment.
can we use absolute path instead of relative path ?
clients/python/test/test_client.py
Outdated
| client = Client(URL) | ||
|
|
||
| assert client.get_descriptor('test.One') | ||
| assert client.get_descriptor('test.faile') is None |
clients/python/test/test_client.py
Outdated
| @@ -0,0 +1,26 @@ | |||
| from src.raystack.stencil import Client | |||
| from src.raystack.store import Store | |||
| from mock import patch | |||
There was a problem hiding this comment.
Use unittest.mock instead
clients/python/test/test_client.py
Outdated
|
|
||
| client = Client(URL) | ||
|
|
||
| assert client.get_descriptor('test.One') |
There was a problem hiding this comment.
Are we asserting the value evaluates to True or True equivalent ?
This PR adds the following: