Пример #1
0
    def test_vcl_is_not_changed(self, varnish_api_mock):
        varnish_api_mock.vcl_active_name.return_value = 'vcl-current-vol_cfff2'

        vcl = Vcl('vcl content')
        vcl.name = 'vcl-new-vol.cfff2'

        loader = VclLoader(varnish_api_mock)

        assert_false(loader.vcl_has_changed(vcl))
Пример #2
0
    def test_vcl_is_not_changed(self, varnish_api_mock):
        varnish_api_mock.vcl_active_name.return_value = 'vcl-current-vol.cfff2'

        vcl = Vcl('vcl content')
        vcl.name = 'vcl-new-vol.cfff2'

        loader = VclLoader(varnish_api_mock)

        assert_false(loader.vcl_has_changed(vcl))
Пример #3
0
    def test_vcl_is_changed(self, varnish_api_mock):
        varnish_api_mock.vcl_content_active.return_value = 'vcl old content'

        loader = VclLoader(varnish_api_mock)

        assert_true(loader.vcl_has_changed(Vcl('vcl content')))
Пример #4
0
    def test_vcl_is_changed(self, varnish_api_mock):
        varnish_api_mock.vcl_content_active.return_value = 'vcl old content'

        loader = VclLoader(varnish_api_mock)

        assert_true(loader.vcl_has_changed(Vcl('vcl content')))