using mock instead of unittest.mock - it is the same but needed for earlier python version then 3.3