@patch('open_connect.accounts.views.messages')
    def test_get_object_user_is_banned(self, mock_messages):
        user = mommy.make('accounts.User', is_banned=True)
        view = views.UserDetailView()
        view.request = self.request
        view.request.user = self.create_superuser()
        view.kwargs = {'user_uuid': user.uuid}
        self.assertEqual(view.get_object(), user)
        self.assertEqual(
            mock_messages.warning.call_args_list[0][0][1],
            'This is a banned account.'
        )
Tries to redirect to a Django app if someone accesses an
dataset/ETHPy150Open ofa/connect/open_connect/accounts/tests/test_views.py/UserDetailViewTest.test_get_object_user_is_banned--crossover with--dataset/ETHPy150Open stephenmcd/gnotty/gnotty/server.py/IRCApplication.respond_django