Converted tests to use self.assertEquals etc rather than raw python assert