Fix violation of coding guidelines
Fix the DbBackendFormTest

Mock ResourceFactory in form tests

fixes #6596
Fix ResourceFormTest

Add function-mock for mysqlAvaialable to prevent the unit test from breaking