Exemple #1
0
def test_customer_is_not_employee():
    c = Customer('John', 'Doe', '*****@*****.**')
    assert c.first_name == 'John'
    assert c.last_name == 'Doe'
    assert c.email == '*****@*****.**'

    assert c.is_employee() is False
def test_if_are_employee():
    c = Customer('John', 'Doe', '*****@*****.**')
    assert c.first_name == 'John'
    assert c.last_name == 'Doe'
    assert c.email == '*****@*****.**'
    assert not c.is_employee()

    e = Employee('Jane', 'Doe', '*****@*****.**')
    assert e.first_name == 'Jane'
    assert e.last_name == 'Doe'
    assert e.email == '*****@*****.**'
    assert e.is_employee()
    def test_if_are_employee(self):
        c = Customer('John', 'Doe', '*****@*****.**')
        self.assertEqual(c.first_name, 'John')
        self.assertEqual(c.last_name, 'Doe')
        self.assertEqual(c.email, '*****@*****.**')
        self.assertFalse(c.is_employee())

        e = Employee('Jane', 'Doe', '*****@*****.**')
        self.assertEqual(e.first_name, 'Jane')
        self.assertEqual(e.last_name, 'Doe')
        self.assertEqual(e.email, '*****@*****.**')
        self.assertTrue(e.is_employee())