Ejemplo n.º 1
0
def test_add_foreign_signatures_errcheck_omitted():
    signatures = dict(spam=(mock.sentinel.argtypes, mock.sentinel.restype))
    library = mock.Mock(name='library')
    library.spam = mock.Mock(name='spam', spec_set=['argtypes', 'restype'])
    assert util.add_foreign_signatures(library, signatures) is library
    assert library.spam.argtypes is mock.sentinel.argtypes
    assert library.spam.restype is mock.sentinel.restype
Ejemplo n.º 2
0
def test_add_foreign_signatures_errcheck_omitted():
    signatures = dict(spam=(mock.sentinel.argtypes, mock.sentinel.restype))
    library = mock.Mock(name='library')
    library.spam = mock.Mock(name='spam', spec_set=['argtypes', 'restype'])
    assert util.add_foreign_signatures(library, signatures) is library
    assert library.spam.argtypes is mock.sentinel.argtypes
    assert library.spam.restype is mock.sentinel.restype