Esempio n. 1
0
 def test_basic(self):
     testcase = [None, "Bree", "Campbell"]
     expected = "*****@*****.**"
     self.assertEqual(find_email(testcase), expected)
Esempio n. 2
0
 def test_two_name(self):
     testcase = [None, "Roy", "Cooper"]
     expected = "No email address found"
     self.assertEqual(find_email(testcase), expected)
Esempio n. 3
0
def main():
    print(find_email(sys.argv))
Esempio n. 4
0
 def test_basic(self):
     testcase = [None, "Peter", "Parker"]
     expected = "*****@*****.**"
     self.assertEqual(find_email(testcase), expected)
Esempio n. 5
0
 def test_one_name(self):
     testcase = [None, "John"]
     expected = "Missing parameters"
     self.assertEqual(find_email(testcase), expected)
 def test_one_name(self):
   '''Test for a single parameter when expecting two'''
   testcase = [None, "John"]
   expected = "Missing parameters"
   self.assertEqual(find_email(testcase), expected)
 def test_two_name(self):
     '''Test for if employee not found'''
     testcase = [None, "Roy", "Cooper"]
     expected = "No email address found"
     self.assertEqual(find_email(testcase), expected)
Esempio n. 8
0
 def test_one_name(self):
   testcase = [None, 'John']
   expected = 'Missing parameters'
   self.assertEqual(find_email(testcase), expected)
    def test_basic(self):
        # None as the first parameter of sys.argv is always the file name

        testcase = [None, "Bree", "Campbell"]
        expected = "*****@*****.**"
        self.assertEqual(find_email(testcase), expected)
Esempio n. 10
0
 def test_basic(self):
   testcase = [None, 'Bree', 'Campbell']
   expected = '*****@*****.**'
   self.assertEqual(find_email(testcase), expected)
Esempio n. 11
0
 def test_two_name(self):
   testcase = [None,'Roy','Cooper']
   expected = 'No email address found'
   self.assertEqual(find_email(testcase), expected)
Esempio n. 12
0
 def test_basic(self):
     testcase = [None, "Venu", "Koosuri"]
     expected = "*****@*****.**"
     self.assertEqual(find_email(testcase), expected)
Esempio n. 13
0
 def test_basic(self):  #no argv o primeiro parametro e o sript file
     testcase = [None, "Bree",
                 "Campbell"]  #como o metodo find_email ja foi importado
     expected = "*****@*****.**"  #o primeiro parametro vai ser none ja que o metodo ja vai ser chamado no teste
     self.assertEqual(find_email(testcase), expected)
 def test_basic(self): #     I will name this test as "test_basic"
     testcase = "Bree Campbell"
     expected = "*****@*****.**"
     self.assertEqual(find_email(testcase), expected)