Beispiel #1
0
def test_empty_api_tree():
    api_tree = {}

    config = MockConfigurator()
    scan_api_tree(config, api_tree)

    assert not config.routes
Beispiel #2
0
 def do_scan(self):
     self.config = MockConfigurator()
     scan_api_tree(
         configurator=self.config,
         api_tree=self.api_tree,
         root_path=''
         )
Beispiel #3
0
def test_empty_api_tree():
    api_tree = {}
    
    config = MockConfigurator()
    scan_api_tree(config, api_tree)
    
    assert not config.routes
Beispiel #4
0
 def do_scan(self):
     self.config = MockConfigurator()
     scan_api_tree(configurator=self.config,
                   api_tree=self.api_tree,
                   root_path='')
Beispiel #5
0
 def exception_test(self, api_tree):
     configurator = MockConfigurator()
     with pytest.raises(APITreeError):
         scan_api_tree(configurator, api_tree)
Beispiel #6
0
 def exception_test(self, api_tree):
     configurator = MockConfigurator()
     with pytest.raises(APITreeError):
         scan_api_tree(configurator, api_tree)