Exemple #1
0
    def test_student_level_of_access(self):
        logout('localhost')

        user = login_user('z100', 'student228', 'localhost')
        self.assertEqual(has_access('localhost', Student), True)
        self.assertEqual(has_access('localhost', Staff), False)
        self.assertEqual(has_access('localhost', Admin), False)
Exemple #2
0
    def test_admin_level_of_access(self):
        logout('localhost')

        user = login_user('z1', 'adminPass', 'localhost')
        self.assertEqual(has_access('localhost', Student), True)
        self.assertEqual(has_access('localhost', Staff), True)
        self.assertEqual(has_access('localhost', Admin), True)
 def logout(cls):
     sec.logout()
Exemple #4
0
def logout_page():
	return logout(request.remote_addr)
Exemple #5
0
    def test_student_logout(self):
        logout('localhost')

        self.assertEqual(get_user('localhost'), None)
        self.assertEqual(has_access('localhost', Student), False)
Exemple #6
0
    def test_admin_logout(self):

        logout('localhost')

        self.assertEqual(get_user('localhost'), None)
        self.assertEqual(has_access('localhost', Admin), False)
Exemple #7
0
def logout():
    return security.logout()