Can assert delitem and getitem from the same method