Exemple #1
0
class TestTrade:
    def setup(self):
        self.trade = APP().goto_main().goto_trade()

    def test_create_account(self):
        self.trade.create_a_stack_account("12345678910")

    def teardown(self):
        self.trade.quit()
Exemple #2
0
class TestLoginPage:

    def setup(self):
        self.login = APP().goto_main().goto_profile().goto_login()

    def test_login_by_passwd(self):
        login = self.login.login_by_passwd('asdfafsdfa', 'safsdjfoasjdofa')
        assert '错误' in login.login_msg

    def teardown(self):
        self.login.quit()
Exemple #3
0
class TestMain:
    def setup(self):
        self.main = APP().goto_main()

    def test_search(self):
        stacks = self.main.goto_search().search('茅台')
        stack_price = stacks.get_stack_price('SH600519')
        assert stack_price > 2000

    def teardown(self):
        self.main.quit()
Exemple #4
0
class TestSearch:
    def setup(self):
        self.search = APP().goto_main().goto_search()

    # def test_add_stack(self):
    #     self.search.search('京东')
    #     self.search.add_stack('JD')
    #     assert '已添加' in self.search.get_add_msg('JD')

    # @pytest.mark.parametrize('keyword, stack', data)
    # def test_add_stack(self, keyword, stack):
    #     self.search.search(keyword)
    #     self.search.add_stack(stack)
    #     assert '已添加' in self.search.get_add_msg(stack)

    def teardown(self):
        self.search.quit()
Exemple #5
0
 def setup(self):
     self.login = APP().goto_main().goto_profile().goto_login()
Exemple #6
0
 def setup(self):
     self.main = APP().goto_main()
Exemple #7
0
 def setup(self):
     self.trade = APP().goto_main().goto_trade()
Exemple #8
0
 def setup(self):
     self.search = APP().goto_main().goto_search()