Example #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)
Example #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)
Example #3
0
def test_dummy_initialization():
    """ Test that DummyDmesg initializes """
    dmesg.DummyDmesg()
Example #4
0
 def test_repr(self):
     assert repr(dmesg.DummyDmesg()) == 'DummyDmesg()'