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