def test_login(self):
     path = os.path.join(DATA_PATH, 'login.html')
     content = open(path).read()
     login = parsers.main_menu(content)
     self.assertTrue(login['authenticated'])
     self.assertEqual(login['session_id'],
                      'Q102112146D')
 def test_needs_registration(self):
     path = os.path.join(DATA_PATH, 'not_registered.html')
     content = open(path).read()
     login = parsers.main_menu(content)
     self.assertFalse(login['registered'])