Fixed DB tests.
Fixed Sphinx tests.