class Physics_G3(test_env.TestEnv): def test_physics_g3(self): self.pys_g3 = PublicMethod(self.driver) if self.FILENAME == 'run_all_ko.py': self.pys_g3.generate_access_code(ExamPath_KO.physics_g3) self.pys_g3.access(ExamPath_KO.physics_g3) elif self.FILENAME == 'run_all_en.py': pass elif self.FILENAME == 'run_all_cn.py': pass self.pys_g3.begin_exam() self.pys_g3.select_answers()
class Math_G1(test_env.TestEnv): def test_math_g1(self): self.math_g1 = PublicMethod(self.driver) if self.FILENAME == 'run_all_ko.py': self.math_g1.generate_access_code(ExamPath_KO.math_g1) self.math_g1.access(ExamPath_KO.math_g1) elif self.FILENAME == 'run_all_en.py': pass elif self.FILENAME == 'run_all_cn.py': pass self.math_g1.begin_exam() self.math_g1.select_answers()
class Creativity(test_env.TestEnv): def test_creativity(self): self.cr = PublicMethod(self.driver) if self.FILENAME == 'run_all_ko.py': self.cr.generate_access_code(ExamPath_KO.cr) self.cr.access(ExamPath_KO.cr) elif self.FILENAME == 'run_all_en.py': pass elif self.FILENAME == 'run_all_cn.py': pass self.cr.creativity_answers()
class CT(test_env.TestEnv): def test_ct(self): self.ct = PublicMethod(self.driver) if self.FILENAME == 'run_all_ko.py': self.ct.generate_access_code(ExamPath_KO.ct) self.ct.access(ExamPath_KO.ct) elif self.FILENAME == 'run_all_en.py': pass elif self.FILENAME == 'run_all_cn.py': pass self.ct.ct_sample_instruction() self.ct.ct_sample_exam() self.ct.ct_real_exam()
class FACN(test_env.TestEnv): def test_fa_cn(self): self.fa = PublicMethod(self.driver) if self.FILENAME == 'run_all_ko.py': self.fa.generate_access_code(ExamPath_KO.ct) self.fa.access(ExamPath_KO.ct) elif self.FILENAME == 'run_all_en.py': pass elif self.FILENAME == 'run_all_cn.py': print 111 self.fa.generate_access_code(ExamPath_CN.random_fa) self.fa.access(ExamPath_CN.random_fa)
class QL(test_env.TestEnv): def test_ql(self): self.ct = PublicMethod(self.driver) if self.FILENAME == 'run_all_ko.py': self.ct.generate_access_code(ExamPath_KO.ct) self.ct.access(ExamPath_KO.ct) elif self.FILENAME == 'run_all_en.py': pass elif self.FILENAME == 'run_all_cn.py': pass self.ct.ct_sample_instruction() self.ct.ct_sample_exam() self.ct.ct_real_exam()
class SampleQL(unittest.TestCase): def setUp(self): self.driver = webdriver.Remote(command_executor=ConfigData.EXECUTOR, desired_capabilities=ConfigData.desired_cap) self.cr = PublicMethod(self.driver) if FILENAME == 'run_all_ko.py': self.cr.generate_access_code(ExamPath_KO.cr) self.cr.access(ExamPath_KO.cr) elif FILENAME == 'run_all_en.py': pass elif FILENAME == 'run_all_cn.py': pass def test_creativity(self): self.cr.creativity_answers() def tearDown(self): self.driver.quit()
class Random_CS_G1(test_env.TestEnv): def test_random_cs_g1(self): for _ in range(10): self.random_cs_g1 = PublicMethod(self.driver) if self.FILENAME == 'run_all_ko.py': self.random_cs_g1.generate_access_code(ExamPath_KO.random_g1) self.random_cs_g1.access(ExamPath_KO.random_g1) self.random_cs_g1.insturction_in_email() elif self.FILENAME == 'run_all_en.py': self.random_cs_g1.generate_access_code(ExamPath_EN.random_g1) self.random_cs_g1.access(ExamPath_EN.random_g1) elif self.FILENAME == 'run_all_cn.py': pass self.random_cs_g1.random_exam()
class MathPhysics_G1(test_env.TestEnv): def test_mathphyiscs_g1(self): self.mathphyiscs_g1 = PublicMethod(self.driver) if self.FILENAME == 'run_all_ko.py': self.mathphyiscs_g1.generate_access_code(ExamPath_KO.random_g1) self.mathphyiscs_g1.access(ExamPath_KO.random_g1) self.mathphyiscs_g1.insturction_in_email() elif self.FILENAME == 'run_all_en.py': self.mathphyiscs_g1.generate_access_code(ExamPath_EN.random_g1) self.mathphyiscs_g1.access(ExamPath_EN.random_g1) elif self.FILENAME == 'run_all_cn.py': pass self.mathphyiscs_g1.begin_exam() self.mathphyiscs_g1.select_answers() self.mathphyiscs_g1.begin_exam() self.mathphyiscs_g1.select_answers()