How to use the impostor.backend.AuthBackend.get_user function in Impostor

To help you get started, we’ve selected a few Impostor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github samastur / Impostor / tests / test_impostor.py View on Github external
def test_get_user(self, user_passed, user_expected):
        """
        check get_user method
        :param user_passed:
        :param user_expected:
        :return:
        """
        try:
            user_id = user_passed.id
        except AttributeError:
            user_id = None
        result = AuthBackend.get_user(user_id)
        assert result == user_expected