예제 #1
0
 def testers(self):
     # The setter for result.TestResult checks types, rather than trying to
     # make the sentinel pass that test, just make a mock that mostly acts
     # like TestResult
     result = mock.Mock(spec=results.TestResult)
     result.dmesg = mock.sentinel.dmesg
     result.result = mock.sentinel.result
     return self._Namespace(dmesg.DummyDmesg(), result)
예제 #2
0
def test_dummydmesg_update_result():
    """dmesg.DummyDmesg.update_result: returns result unmodified"""
    dmesg_ = dmesg.DummyDmesg()
    result = mock.MagicMock(spec=results.TestResult())
    result.dmesg = mock.sentinel.dmesg
    result.result = mock.sentinel.result
    dmesg_.update_result(result)

    nt.eq_(result.dmesg, mock.sentinel.dmesg)
    nt.eq_(result.result, mock.sentinel.result)
예제 #3
0
def test_dummy_initialization():
    """ Test that DummyDmesg initializes """
    dmesg.DummyDmesg()
예제 #4
0
 def test_repr(self):
     assert repr(dmesg.DummyDmesg()) == 'DummyDmesg()'