Example #1
0
    def test_get_context_no_line(self):
        user = self.add_user(firstname="test_user1")

        context = user_dao.get_context(user.id)

        self.assertEqual(context, None)
Example #2
0
    def test_get_context(self):
        user_line = self.add_user_line_with_exten()

        context = user_dao.get_context(user_line.user.id)

        self.assertEquals(context, user_line.line.context)
Example #3
0
 def get_context(self, user_id):
     try:
         line = self.get_line(user_id)
     except (NoSuchUserException, NoSuchLineException):
         return user_dao.get_context(user_id)
     return line['context']
Example #4
0
 def get_context(self, user_id):
     try:
         line = self.get_line(user_id)
     except (NoSuchUserException, NoSuchLineException):
         return user_dao.get_context(user_id)
     return line['context']
Example #5
0
    def test_get_context_no_line(self):
        user = self.add_user(firstname='test_user1')

        context = user_dao.get_context(user.id)

        self.assertEqual(context, None)
Example #6
0
    def test_get_context(self):
        user_line = self.add_user_line_with_exten()

        context = user_dao.get_context(user_line.user.id)

        self.assertEquals(context, user_line.line.context)