Ejemplo n.º 1
0
    def test_convert_filters_tenant_id(self):
        expected_project_id = 'fake-tenant-id'
        kwargs = {'filter%d' % i: 'value%d' % i for i in range(0, 10)}
        expected = kwargs.copy()
        expected['project_id'] = expected_project_id

        self.assertEqual(
            expected,
            utils.convert_filters(tenant_id=expected_project_id, **kwargs))
Ejemplo n.º 2
0
    def test_convert_filters_tenant_id(self):
        expected_project_id = 'fake-tenant-id'
        kwargs = {
            'filter%d' % i: 'value%d' % i
            for i in range(0, 10)
        }
        expected = kwargs.copy()
        expected['project_id'] = expected_project_id

        self.assertEqual(
            expected,
            utils.convert_filters(tenant_id=expected_project_id, **kwargs)
        )
Ejemplo n.º 3
0
 def test_convert_filters_no_tenant_id(self):
     kwargs = {
         'filter%d' % i: 'value%d' % i
         for i in range(0, 10)
     }
     self.assertEqual(kwargs, utils.convert_filters(**kwargs))