Esempio n. 1
0
    def test_mandatory_methods(self):
        manager = Manager(123, 123 , 123)
        manager.get_department()
        manager.set_department(None)

        seller = Seller(123, 123 , 123)
        seller.get_department()
        seller.set_department(None)
Esempio n. 2
0
    def test_inherited_methods(self):
        manager = Manager(123, 123 , 123)
        manager.calc_bonus()
        manager.get_hours()
        manager.get_department()
        manager.set_department(None)

        seller = Seller(123, 123 , 123)
        seller.calc_bonus()
        seller.get_hours()
        seller.get_department()
        seller.set_department(None)
Esempio n. 3
0
    def test_set_get_department_name(self):
        manager = Manager(123, 123 , 123)
        old_dep_name = manager.get_department()
        new_dep_name = 'top_managers'
        manager.set_department(new_dep_name)
        assert manager.get_department() != old_dep_name
        assert manager.get_department() == new_dep_name

        seller = Seller(123, 123 , 123)
        old_dep_name = seller.get_department()
        new_dep_name = 'top_sellers'
        seller.set_department(new_dep_name)
        assert seller.get_department() != old_dep_name
        assert seller.get_department() == new_dep_name