Exemplo n.º 1
0
 def test_postprocesss(self):
     compiler = SCSS()
     with patch("static_precompiler.compilers.scss.convert_urls"
                ) as mocked_convert_urls:
         mocked_convert_urls.return_value = "spam"
         self.assertEqual(compiler.postprocess("ham", "eggs"), "spam")
         mocked_convert_urls.assert_called_with("ham", "eggs")
Exemplo n.º 2
0
def test_postprocesss(monkeypatch):
    compiler = SCSS()
    convert_urls = call_recorder(lambda *args: "spam")
    monkeypatch.setattr("static_precompiler.compilers.scss.convert_urls",
                        convert_urls)
    assert compiler.postprocess("ham", "eggs") == "spam"
    assert convert_urls.calls == [call("ham", "eggs")]
def test_postprocesss(monkeypatch):
    compiler = SCSS()
    convert_urls = call_recorder(lambda *args: "spam")
    monkeypatch.setattr("static_precompiler.compilers.scss.convert_urls", convert_urls)
    assert compiler.postprocess("ham", "eggs") == "spam"
    assert convert_urls.calls == [call("ham", "eggs")]
 def test_postprocesss(self):
     compiler = SCSS()
     with patch("static_precompiler.compilers.scss.convert_urls") as mocked_convert_urls:
         mocked_convert_urls.return_value = "spam"
         self.assertEqual(compiler.postprocess("ham", "eggs"), "spam")
         mocked_convert_urls.assert_called_with("ham", "eggs")