def test_has_masquerade(self, user='******'):
        canvas = Canvas(as_user=user)
        self.assertEquals(canvas._as_user, user)

        params = {}
        canvas._set_as_user(params)
        self.assertEquals(params, {'as_user_id': 'sis_user_id:%s' % user})
    def test_no_masquerade(self):
        canvas = Canvas()
        self.assertEquals(canvas._as_user, None)

        params = {}
        canvas._set_as_user(params)
        self.assertEquals(len(params), 0)