Ejemplo n.º 1
0
 def test_handles_none_as_constant(self):
     constant_result = ConstantResult(value=None)
     assert constant_result.read("still not used") is constant_result
Ejemplo n.º 2
0
    def test_handles_none_as_constant(self):

        constant_result = ConstantResult(None)
        assert constant_result.read("still not used") is None
        output = constant_result.write()
        assert output == "None"
Ejemplo n.º 3
0
 def test_read_returns_self(self):
     constant_result = ConstantResult(value="hello world")
     assert constant_result.read("this param isn't used") is constant_result
Ejemplo n.º 4
0
    def test_write_doesnt_overwrite_value(self):
        constant_result = ConstantResult("untouchable!")

        constant_result.write()
        assert constant_result.value == "untouchable!"
        assert constant_result.read("still unused") == "untouchable!"