示例#1
0
文件: rest.py 项目: moremoban/gease
def get_token():
    """
    Find geasefile from user's home folder
    """
    return utils.get_info(constants.KEY_GEASE_TOKEN)
示例#2
0
 def test_wrong_key(self):
     self.fake_expand.return_value = os.path.join(
         "tests", "fixtures", "malformed"
     )
     get_info(constants.KEY_GEASE_TOKEN)
示例#3
0
 def test_get_token(self):
     self.fake_expand.return_value = os.path.join("tests", "fixtures")
     user = get_info(constants.KEY_GEASE_TOKEN)
     eq_(user, "test")
示例#4
0
 def test_no_gease_file(self):
     self.fake_expand.return_value = os.path.join("tests")
     get_info(constants.KEY_GEASE_TOKEN)
示例#5
0
def get_default_user():
    return utils.get_info(constants.KEY_GEASE_USER)