Replace assertEquals with assertEqual - tests/api

The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.

This is part of blueprint assertequal

Change-Id: I72f612cc62f90a079c9c53747e3bcbfebfb8eb96
Merge "Replace assertEquals with assertEqual - tests/api"