Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(82)  |  Call(80)  |  Derive(0)  |  Import(2)

src/z/t/ztpserver-HEAD/test/server/test_controller.py   ztpserver(Download)
from ztpserver.serializers import SerializerError
 
from server_test_lib import remove_all, random_string
from server_test_lib import ztp_headers, write_file
from server_test_lib import create_definition, create_attributes, create_node
    def test_bootstrap_resource(self):
        url = '/bootstrap/%s' % random_string()
        self.match_routes(url, None, 'GET,POST,PUT,DELETE')
 
    def test_files_collection(self):
        url = '/files'
        self.match_routes(url, None, 'GET,POST,PUT,DELETE')
 
    def test_files_resource(self):
        url = '/files/%s' % random_string()
    def test_files_resource(self):
        url = '/files/%s' % random_string()
        self.match_routes(url, 'GET', 'POST,PUT,DELETE')
 
        url = '/files/%s/%s' % (random_string(), random_string())

src/z/t/ztpserver-HEAD/test/server/test_repository.py   ztpserver(Download)
from ztpserver.repository import create_file_store
 
from server_test_lib import random_string, remove_all
from server_test_lib import add_folder, write_file
 
    def test_success(self):
        filename = random_string()
        contents = random_string()
 
        filepath = write_file(contents, filename)
    def test_file_missing(self):
        filename = random_string()
        obj = FileObject(filename)
 
        def contents(obj):
    def test_add_folder(self):
        folder = random_string()
        self.filestore.add_folder(folder)
 
        filepath = os.path.join(self.filepath, folder)