def test_message(self): a1 = Audit.from_logentry(log_callbacks) expected = """ after: Client: yoOjy6poL2dVPVcXgi7zc8gCS0qvnOzpwyQemCTw, redirects: https://stg-sr.us.truenth.org/, callback: https://stg-sr.us.truenth.org/_/callback""" self.assertEquals(a1.comment, expected)
def test_parse_timezone(self): a1 = Audit.from_logentry(log_login_google) expected = parser.parse("2016-02-23 09:52") self.assertEquals(a1.timestamp, expected)
def test_parse_subject(self): a1 = Audit.from_logentry(log_login_idp) self.assertEquals(a1.subject_id, TEST_USER_ID)
def test_parse_context(self): a1 = Audit.from_logentry(log_login_idp) self.assertEquals(a1.context, "login")
def test_parse_timezone(self): a1 = Audit.from_logentry(log_login_google) expected = parser.parse("2016-02-23 09:52") assert a1.timestamp == expected
def test_parse_user(self): a1 = Audit.from_logentry(log_login_idp) self.assertEquals(a1.user_id, TEST_USER_ID)
def test_parse_context(self): a1 = Audit.from_logentry(log_login_idp) assert a1.context == "login"
def test_message(self): a1 = Audit.from_logentry(log_callbacks) expected = """ after: Client: yoOjy6poL2dVPVcXgi7zc8gCS0qvnOzpwyQemCTw, redirects: https://stg-sr.us.truenth.org/, callback: https://stg-sr.us.truenth.org/_/callback""" assert a1.comment == expected
def test_parse_subject(self): a1 = Audit.from_logentry(log_login_idp) assert a1.subject_id == TEST_USER_ID
def test_parse_user(self): a1 = Audit.from_logentry(log_login_idp) assert a1.user_id == TEST_USER_ID
def test_parse_context(self): a1 = Audit.from_logentry(log_login_idp) assert a1.context == "login"
def test_parse_subject(self): a1 = Audit.from_logentry(log_login_idp) assert a1.subject_id == TEST_USER_ID
def test_parse_user(self): a1 = Audit.from_logentry(log_login_idp) assert a1.user_id == TEST_USER_ID