Fixed a bug.

Was missing the `self` parameter in a method. test.py now behaves as
expected.