-
Notifications
You must be signed in to change notification settings - Fork 4
Support for user auth(). #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
syncano/models/accounts.py
Outdated
|
|
||
| data = { | ||
| 'username': connection.username, | ||
| 'password' : connection.password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obsolete whitespace before :
|
some test would be nice ;) |
|
Now it can be used that way, we have to rethink how to do it in case we want to do it during the connection. connection = syncano.connect(api_key='key', instance_name='picoblocks')
print connection.User().auth(username='maciej@kucharz.net', password='test123') |
syncano/models/accounts.py
Outdated
| connection = self._get_connection() | ||
|
|
||
| if not (username and password): | ||
| raise SyncanoValueError('You need provide username and password!') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually use dots et the end of Exception msg.
|
@mkucharz what about simple test case? I think that you can add it in integration_test_accounts:) |
|
LGTM. |
Not sure if it is right place...