def testExtractPathIdentifiers_ViewedUserOnly(self): (username, project_name, hotlist_id, hotlist_name ) = monorailrequest._ParsePathIdentifiers('/u/[email protected]/') self.assertEquals('*****@*****.**', username) self.assertIsNone(project_name) self.assertIsNone(hotlist_id) self.assertIsNone(hotlist_name)
def testExtractPathIdentifiers_HotlistIssuesURLSpace(self): (username, project_name, hotlist_id, hotlist_name) = monorailrequest._ParsePathIdentifiers( '/u/[email protected]/hotlists/testname?q=stuff&ts=more') self.assertIsNone(project_name) self.assertIsNone(hotlist_id) self.assertEquals('*****@*****.**', username) self.assertEquals('testname', hotlist_name)
def testExtractPathIdentifiers_ViewedGroupURLSpace(self): (username, project_name, hotlist_id, hotlist_name) = monorailrequest._ParsePathIdentifiers( '/g/[email protected]/updates') self.assertEquals('*****@*****.**', username) self.assertIsNone(project_name) self.assertIsNone(hotlist_id) self.assertIsNone(hotlist_name)
def testExtractPathIdentifiers_ProjectOnly(self): (username, project_name, hotlist_id, hotlist_name) = monorailrequest._ParsePathIdentifiers( '/p/proj/issues/list?q=foo+OR+bar&ts=1234') self.assertIsNone(username) self.assertIsNone(hotlist_id) self.assertIsNone(hotlist_name) self.assertEquals('proj', project_name)