示例#1
0
文件: auth.py 项目: Krenair/srobo-ide
	def test_canLogin(self):
		data = dict(username = config.username, password = config.password)
		resp = util.makeIDERequest(util.loginEndPoint, data)

		util.assertEqual(resp['display-name'], config.username, "Got the wrong display name")

		token = util.getCurrentToken()
		util.assertIsNotNone(token, "No token stored from server response")
示例#2
0
    def test_canLogin(self):
        data = dict(username=config.username, password=config.password)
        resp = util.makeIDERequest(util.loginEndPoint, data)

        util.assertEqual(resp['display-name'], config.username,
                         "Got the wrong display name")

        token = util.getCurrentToken()
        util.assertIsNotNone(token, "No token stored from server response")
示例#3
0
	def setUpClass(cls):
		# Log In
		data = dict(username = config.username, password = config.password)
		util.makeIDERequest(util.loginEndPoint, data)

		token = util.getCurrentToken()
		util.assertIsNotNone(token, "No token stored from server response")

		# Get a team
		resp = util.makeIDERequest('user/info')
		teams = resp['teams']
		util.assertGreaterThan(0, len(teams), "User must be in a team to test the IDE")

		cls._team = teams.keys()[0]
示例#4
0
    def setUpClass(cls):
        # Log In
        data = dict(username=config.username, password=config.password)
        util.makeIDERequest(util.loginEndPoint, data)

        token = util.getCurrentToken()
        util.assertIsNotNone(token, "No token stored from server response")

        # Get a team
        resp = util.makeIDERequest('user/info')
        teams = resp['teams']
        util.assertGreaterThan(0, len(teams),
                               "User must be in a team to test the IDE")

        cls._team = teams[0]['id']