Remove duplicate setup logic in federation tests

This commit removes some duplicate setup logic for the federation test
cases.

Change-Id: I8886a83ffa8100af95d5cd877e8adacc9d38bbd6
Closes-Bug: #1389623
Adds missing log hints for level E/I/W

This patch adds logging hints for the remaining logging statements.

bp more-code-style-automation

Change-Id: I78801d9d3187df6470b51b3ecb0f182440112d13
Extends hacking check for logging to verify i18n hints

The original check would make sure that debug logging didn't use the
translation function. The check will now make sure that none of the
translation helpers are used for debug logging and that the correct
helper is used for logging statements.

bp more-code-style-automation

Change-Id: I536de5f21fe82fa3426040b8a4cfa5b81bdd5a8b
Correct use of config fixture

Some test modules weren't using the config fixture where it should
be used.

Change-Id: Ib769ae81f3714adbcdf4664f687236443731d0f5
Add import i18n to federation/controllers.py

Also, added a test to check the branch where _() was being
used in federation/controllers.py.

Change-Id: Id5b957ad6d8d3a85a614d1bd55e2c0dadd7dbd04
Fixes create_saml_assertion() return

The create_saml_assertion() method only accepts project scoped tokens.
When using a domain scoped one it should return 403 correctly
informing the caller about this requirenment.

Change-Id: I1223f284a84dee05e4a3907e04345497e5f767c1
Closes-Bug: 1395117
Merge "Adds missing log hints for level E/I/W"
Merge "Extends hacking check for logging to verify i18n hints"
Merge "Correct use of config fixture"
Merge "Add import i18n to federation/controllers.py"
Merge "Fixes create_saml_assertion() return"
Merge "Remove duplicate setup logic in federation tests"