failUnless and assertEquals are deprecated so replace them with assertTrue and assertEqual respectively
Python 3.4 changed the way how weakref works so adjust for that