mock opened, print test and attribute test