Fixed PendingDeprecationWarning in backends tests

Ticket: https://code.djangoproject.com/ticket/21199

With this commit, there are no more warnings issued from the test suite with -Wall.