Pytest Assert Function Called