if qiita_config.portal == "QIITA": from qiita_pet.handlers.portal import ( StudyPortalHandler, StudyPortalAJAXHandler) DIRNAME = dirname(__file__) STATIC_PATH = join(DIRNAME, "static") TEMPLATE_PATH = join(DIRNAME, "templates") # base folder for webpages _, RES_PATH = get_mountpoint('job')[0] COOKIE_SECRET = b64encode(uuid4().bytes + uuid4().bytes) DEBUG = qiita_config.test_environment _vendor_js = join(STATIC_PATH, 'vendor', 'js') if not exists(join(_vendor_js, 'moi.js')): copy(moi_js(), _vendor_js) copy(moi_list_js(), _vendor_js) class Application(tornado.web.Application): def __init__(self): handlers = [ (r"/", MainHandler), (r"/auth/login/", AuthLoginHandler), (r"/auth/logout/", AuthLogoutHandler), (r"/auth/create/", AuthCreateHandler), (r"/auth/verify/(.*)", AuthVerifyHandler), (r"/auth/forgot/", ForgotPasswordHandler), (r"/auth/reset/(.*)", ChangeForgotPasswordHandler), (r"/profile/", UserProfileHandler), (r"/user/messages/", UserMessagesHander),
def test_moi_js(self): self.assertTrue(exists(moi_js())) self.assertEqual(split(moi_js())[1], 'moi.js')