[ticket/303] Add tests for get_user_groups()

B3P-303
[ticket/303] Add sql_exists to cache mock

B3P-303
Merge pull request #304 from marc1706/ticket/303

[ticket/303] Fix character_limit() tests