fix tests for py26 and py33