예제 #1
0
    def test_descope_messages_set(self):
        key = utils.scope_message_ids_set('my-q')
        self.assertEqual(('my-q', None), utils.descope_message_ids_set(key))

        key = utils.scope_message_ids_set('my-q', '123')
        self.assertEqual(('my-q', '123'), utils.descope_message_ids_set(key))

        key = utils.scope_message_ids_set(None, '123')
        self.assertEqual((None, '123'), utils.descope_message_ids_set(key))

        key = utils.scope_message_ids_set()
        self.assertEqual((None, None), utils.descope_message_ids_set(key))
예제 #2
0
    def test_descope_messages_set(self):
        key = utils.scope_message_ids_set('my-q')
        self.assertEqual(('my-q', None), utils.descope_message_ids_set(key))

        key = utils.scope_message_ids_set('my-q', '123')
        self.assertEqual(('my-q', '123'), utils.descope_message_ids_set(key))

        key = utils.scope_message_ids_set(None, '123')
        self.assertEqual((None, '123'), utils.descope_message_ids_set(key))

        key = utils.scope_message_ids_set()
        self.assertEqual((None, None), utils.descope_message_ids_set(key))
예제 #3
0
    def test_scope_messages_set(self):
        self.assertEqual('.my-q.', utils.scope_message_ids_set('my-q'))
        self.assertEqual('p.my-q.', utils.scope_message_ids_set('my-q', 'p'))
        self.assertEqual('p.my-q.s',
                         utils.scope_message_ids_set('my-q', 'p', 's'))

        self.assertEqual('..', utils.scope_message_ids_set(None))
        self.assertEqual('123..', utils.scope_message_ids_set(None, '123'))
        self.assertEqual('..s', utils.scope_message_ids_set(None, None, 's'))
예제 #4
0
    def test_scope_messages_set(self):
        self.assertEqual('.my-q.', utils.scope_message_ids_set('my-q'))
        self.assertEqual('p.my-q.', utils.scope_message_ids_set('my-q', 'p'))
        self.assertEqual('p.my-q.s',
                         utils.scope_message_ids_set('my-q', 'p', 's'))

        self.assertEqual('..', utils.scope_message_ids_set(None))
        self.assertEqual('123..', utils.scope_message_ids_set(None, '123'))
        self.assertEqual('..s', utils.scope_message_ids_set(None, None, 's'))