tests.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:donation-system 作者: amigosdapoli 项目源码 文件源码
def test_donor_fills_wrong_info_and_gets_list_of_fields_to_correct(self):
        """
        I will start testing only payment info and them try to make it more generic
        """
        # Donor has heard about the opportunity to donate to the organization and enters the website
        self.browser.get(self.live_server_url)

        self.fill_in_donation_fields_right()
        self.fill_in_personal_fields_right()
        self.fill_in_cc_fields("411111111111111") # Missing one number

        # Submit
        submit = self.browser.find_element_by_name("subbtn")
        submit.send_keys(Keys.ENTER)

        self.wait_for(lambda: self.assertIn('Alguns dados precisam ser corrigidos:', self.browser.page_source))
        self.assertIn('Erro nas informações de cartão de crédito enviadas.', self.browser.page_source)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号