Exemple #1
0
    def test_expand_wildcards(self):
        module_names = expand_wildcards('testapi.resources.*.resource')
        assert module_names == ['testapi.resources.orders.resource',
                                'testapi.resources.users.resource']

        module_names = expand_wildcards('testapi.*.*.resource')
        assert module_names == ['testapi.resources.orders.resource',
                                'testapi.resources.users.resource']
Exemple #2
0
    def test_expand_wildcards(self):
        module_names = expand_wildcards('testapi.resources.*.resource')
        assert module_names == [
            'testapi.resources.users.resource',
            'testapi.resources.orders.resource'
        ]

        module_names = expand_wildcards('testapi.*.*.resource')
        assert module_names == [
            'testapi.resources.users.resource',
            'testapi.resources.orders.resource'
        ]
Exemple #3
0
 def test_expand_wildcards_package(self):
     module_names = expand_wildcards('testapi.resources.*')
     assert module_names == [
         'testapi.resources', 'testapi.resources.users',
         'testapi.resources.orders'
     ]
Exemple #4
0
 def test_expand_wildcards_with_nonexistent_module_name(self):
     module_names = expand_wildcards('testapi.resources.users.*.resource')
     assert not module_names
Exemple #5
0
 def test_expand_wildcards_package(self):
     module_names = expand_wildcards('testapi.resources.*')
     assert module_names == ['testapi.resources',
                             'testapi.resources.orders',
                             'testapi.resources.users']
Exemple #6
0
 def test_expand_wildcards_with_nonexistent_module_name(self):
     module_names = expand_wildcards('testapi.resources.users.*.resource')
     assert not module_names