示例#1
0
    def test_that_command_works(self):

        application = Application()
        application.add(InstallCommand())

        command = application.find("lang:install")
        tester = CommandTester(command)

        result = tester.execute([("command", command.get_name()), ("--mock")])

        expect(result).to.be.an(int)
        expect(result).to.be(0)

        output = tester.get_display()

        expect(output).to.match("Mock mode activated")
        expect(output).to.match("Installed /resources/lang/default")
        expect(output).to.match("Installed /config/language.py")
    def test_that_command_works(self):

        application = Application()
        application.add(NewCommand())

        command = application.find("lang:new")
        tester = CommandTester(command)

        result = tester.execute([
            ("command", command.get_name()),
            ("name", "en"),
            ("title", "English"),
            ("--mock"),
        ])

        expect(result).to.be.an(int)
        expect(result).to.be(0)

        output = tester.get_display()

        expect(output).to.match("Mock mode activated")
        expect(output).to.match("Installed /resources/lang/en")
示例#3
0
 def test_that_root_bootstrap_cache_is_correct(self):
     expect(root.BOOTSTRAP_CACHE).to.be.eq(paths.ROOT +
                                           paths.BOOTSTRAP_CACHE)
示例#4
0
 def test_that_root_app_http_middleware_is_correct(self):
     expect(root.APP_HTTP_MIDDLEWARE).to.be.eq(paths.ROOT +
                                               paths.APP_HTTP_MIDDLEWARE)
示例#5
0
 def test_that_root_app_http_is_correct(self):
     expect(root.APP_HTTP).to.be.eq(paths.ROOT + paths.APP_HTTP)
示例#6
0
 def test_that_storage_uploads_is_correct(self):
     expect(paths.STORAGE_UPLOADS).to.be.eq('/storage/uploads')
示例#7
0
 def test_that_storage_compiled_is_correct(self):
     expect(paths.STORAGE_COMPILED).to.be.eq('/storage/compiled')
示例#8
0
 def test_that_routes_is_correct(self):
     expect(paths.ROUTES).to.be.eq('/routes')
示例#9
0
 def test_that_app_http_middleware_is_correct(self):
     expect(paths.APP_HTTP_MIDDLEWARE).to.be.eq('/app/http/middleware')
示例#10
0
 def test_that_app_http_controllers_is_correct(self):
     expect(paths.APP_HTTP_CONTROLLERS).to.be.eq('/app/http/controllers')
示例#11
0
 def test_that_app_http_is_correct(self):
     expect(paths.APP_HTTP).to.be.eq('/app/http')
示例#12
0
 def test_that_app_is_correct(self):
     expect(paths.APP).to.be.eq('/app')
示例#13
0
 def test_that_root_tests_is_correct(self):
     expect(root.TESTS).to.be.eq(paths.ROOT + paths.TESTS)
示例#14
0
 def test_that_root_storage_uploads_is_correct(self):
     expect(root.STORAGE_UPLOADS).to.be.eq(paths.ROOT +
                                           paths.STORAGE_UPLOADS)
示例#15
0
 def test_that_root_storage_static_is_correct(self):
     expect(root.STORAGE_STATIC).to.be.eq(paths.ROOT + paths.STORAGE_STATIC)
示例#16
0
 def test_that_resources_templates_is_correct(self):
     expect(paths.RESOURCES_TEMPLATES).to.be.eq('/resources/templates')
示例#17
0
 def test_that_resources_snippets_is_correct(self):
     expect(paths.RESOURCES_SNIPPETS).to.be.eq('/resources/snippets')
示例#18
0
 def test_that_app_providers_is_correct(self):
     expect(paths.APP_PROVIDERS).to.be.eq('/app/providers')
示例#19
0
 def test_that_storage_is_correct(self):
     expect(paths.STORAGE).to.be.eq('/storage')
示例#20
0
 def test_that_bootstrap_is_correct(self):
     expect(paths.BOOTSTRAP).to.be.eq('/bootstrap')
示例#21
0
 def test_that_storage_static_is_correct(self):
     expect(paths.STORAGE_STATIC).to.be.eq('/storage/static')
示例#22
0
 def test_that_bootstrap_cache_is_correct(self):
     expect(paths.BOOTSTRAP_CACHE).to.be.eq('/bootstrap/cache')
示例#23
0
 def test_that_tests_is_correct(self):
     expect(paths.TESTS).to.be.eq('/tests')
示例#24
0
 def test_that_config_is_correct(self):
     expect(paths.CONFIG).to.be.eq('/config')
示例#25
0
 def test_that_root_app_http_controllers_is_correct(self):
     expect(root.APP_HTTP_CONTROLLERS).to.be.eq(paths.ROOT +
                                                paths.APP_HTTP_CONTROLLERS)
示例#26
0
 def test_that_databases_is_correct(self):
     expect(paths.DATABASES).to.be.eq('/databases')
示例#27
0
 def test_that_root_app_providers_is_correct(self):
     expect(root.APP_PROVIDERS).to.be.eq(paths.ROOT + paths.APP_PROVIDERS)
示例#28
0
 def test_that_databases_migrations_is_correct(self):
     expect(paths.DATABASES_MIGRATIONS).to.be.eq('/databases/migrations')
示例#29
0
 def test_that_root_config_is_correct(self):
     expect(root.CONFIG).to.be.eq(paths.ROOT + paths.CONFIG)
示例#30
0
 def test_that_resources_is_correct(self):
     expect(paths.RESOURCES).to.be.eq('/resources')