'Register at hub.erpnext.com, save `name_token` and `access_token`'

def register(self):

    response = requests.post((self.hub_url + u'/api/method/hub.hub.api.register'), data=self.get_args())
    response.raise_for_status()
    response = response.json()
    self.name_token = response.get(u'message').get(u'name')
    self.access_token = response.get(u'message').get(u'access_token')
