コード例 #1
0
 def test17(self):
     self.assertTrue(email_validator("*****@*****.**")) # testing two .. not is a row. 
コード例 #2
0
 def test1(self):
     self.assertFalse(email_validator("hellome.com")) #testing no @ presence 
コード例 #3
0
 def test16(self):
     self.assertFalse(email_validator("*****@*****.**")) #testing for two .. in a row in name
コード例 #4
0
 def test4(self):
     self.assertFalse(email_validator("william@%s" % ("a" * 257))) #testing domain length: too long
コード例 #5
0
 def test15(self):
     self.assertFalse(email_validator("[email protected]&#*?!;^om")) #testing characters outside the required characters for domain
コード例 #6
0
 def test20(self):
     self.assertFalse(email_validator("will\"!,:\"dfkjf!,:df\"fdkdjf\"@me.com")) # !,: can't exist outside of " " 
コード例 #7
0
def test_email_validator():
    assert email_validator('*****@*****.**')
    assert email_validator('juju@[email protected]')
コード例 #8
0
 def test10(self):
   self.assertFalse(email_validator("[email protected]")) #domain ends with - 
コード例 #9
0
 def test11(self):
   self.assertTrue(email_validator("*****@*****.**")) #domain doesn't begin or end with - 
コード例 #10
0
 def test8(self):
   self.assertTrue(email_validator("*****@*****.**")) #testing name length: ok
コード例 #11
0
 def test9(self):
   self.assertFalse(email_validator("*****@*****.**")) #domain begins with - 
コード例 #12
0
 def test7(self):
   self.assertFalse(email_validator("*****@*****.**" % ("a" * 129))) #testing name length: too long
コード例 #13
0
 def test6(self):
   self.assertFalse(email_validator("@me.com")) #testing name length: too short
コード例 #14
0
 def test5(self):
     self.assertTrue(email_validator("*****@*****.**")) #testing domain length: ok
コード例 #15
0
 def test18(self):
     self.assertFalse(email_validator("willi\"*****@*****.**")) #testing one " will fail
コード例 #16
0
 def test12(self):
     self.assertTrue(email_validator("*****@*****.**")) #testing required characters name, without "
コード例 #17
0
 def test19(self):
     self.assertTrue(email_validator("willi\"!,:fd\"dfj\"!,:\"*****@*****.**")) # !,: can exist inside " "
コード例 #18
0
 def test13(self):
     self.assertFalse(email_validator("willi&#*?!;^@me.com")) #testing some characters outside of a-z0-9.\"_- for name
コード例 #19
0
 def test2(self):
     self.assertTrue(email_validator("*****@*****.**")) #testing @ presence
コード例 #20
0
 def test14(self):
     self.assertTrue(email_validator("[email protected]_-9om")) #testing required characters for domain
コード例 #21
0
def test_email_validator():
    assert email_validator("*****@*****.**") == True
    assert email_validator("juno@[email protected]") == False
コード例 #22
0
 def test3(self):
     self.assertFalse(email_validator("william@me")) #testing domain length: too short