Using constant error codes instead of hard-coded

Change all hard-coded error codes to be constants
from webob.exc.py in test_db_plugin.py

Fixes bug: #1225614

Change-Id: I9e58bb84afc66293afa56968a745b798bb88bf16
Merge "Using constant error codes instead of hard-coded"