File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,17 @@ def testapikeyexist(global_data, capsys):
19
19
else :
20
20
assert global_data ["apikey" ] != "YOUR_API_KEY"
21
21
22
+ def testfunctionexist (global_data ):
23
+ mbv = MailboxValidator .SingleValidation (global_data ["apikey" ])
24
+ errors = []
25
+ functions_list = ['ValidateEmail' , 'DisposableEmail' , 'FreeEmail' ]
26
+ for x in range (len (functions_list )):
27
+ # assert hasattr(mbv, functions_list[x]) == True, "Function did not exist."
28
+ if (hasattr (mbv , functions_list [x ]) == False ):
29
+ errors .append ("Function " + functions_list [x ] + " did not exist." )
30
+ # assert no error message has been registered, else print messages
31
+ assert not errors , "errors occured:\n {}" .format ("\n " .join (errors ))
32
+
22
33
def testvalidateemail (global_data ):
23
34
mbv = MailboxValidator .SingleValidation (global_data ["apikey" ])
24
35
results = mbv .ValidateEmail ('example@example.com' )
You can’t perform that action at this time.
0 commit comments