def test_check_website_ok(self): website = 'www.google.com' website = SFNL.check_website(website) assert (website == 'http://www.google.com') website = ' https://www.google.com' website = SFNL.check_website(website) assert (website == 'https://www.google.com') website = ' google.com' website = SFNL.check_website(website) assert (website == 'http://google.com')
def test_check_website_not_ok(self): website = 'askdpoaskd#$!@#$.com' try: website = SFNL.check_website(website) raise AssertionError() except Exception as invalid: print(invalid) website = 'google.123.lsd' try: website = SFNL.check_website(website) raise AssertionError() except Exception as invalid: print(invalid) website = 'https://resultadosdigitais.com.uk/' try: website = SFNL.check_website(website) raise AssertionError() except Exception as invalid: print(invalid)