Home
last modified time | relevance | path

Searched refs:Mock (Results 1 – 25 of 625) sorted by relevance

12345678910>>...25

/external/python/mock/mock/tests/
Dtestmock.py17 MagicMock, Mock, NonCallableMock,
73 mock = Mock()
78 self.assertTrue(is_instance(mock.return_value, Mock),
101 mock = Mock(return_value=None)
122 mock = Mock(name='foo')
126 mocks = [(Mock(), 'mock'), (Mock(name='bar'), 'bar')]
141 mock = Mock(spec=X)
144 mock = Mock(spec=X())
147 mock = Mock(spec_set=X)
150 mock = Mock(spec_set=X())
[all …]
Dtestsealable.py15 m = mock.Mock()
17 self.assertIsInstance(m.test, mock.Mock)
18 self.assertIsInstance(m.test(), mock.Mock)
19 self.assertIsInstance(m.test().test2(), mock.Mock)
22 m = mock.Mock()
31 m = mock.Mock()
38 m = mock.Mock()
46 m = mock.Mock()
54 m = mock.Mock()
62 m = mock.Mock(test_value=1)
[all …]
Dtestmagicmethods.py22 from mock import Mock, MagicMock
30 mock = Mock()
33 mock.__getitem__ = Mock()
54 mock = Mock()
68 mock1 = Mock()
69 mock2 = Mock()
71 mock1.__iter__ = Mock(return_value=iter([]))
77 mock = Mock()
84 mock = Mock()
92 mock = Mock()
[all …]
/external/skia/tests/
DTDPQueueTest.cpp67 struct Mock { struct
72 static bool LessP(Mock* const& a, Mock* const& b) { return a->fPriority < b->fPriority; } in LessP() argument
73 static int* PQIndex(Mock* const& mock) { return &mock->fIndex; } in PQIndex() argument
75 bool operator== (const Mock& that) const { in operator ==() argument
78 bool operator!= (const Mock& that) const { return !(*this == that); } in operator !=() argument
83 static const Mock kSentinel = {-1, -1, -1}; in random_test()
88 SkTDArray<Mock> array; in random_test()
91 Mock* mock = array.append(); in random_test()
102 SkTDPQueue<Mock*, Mock::LessP, Mock::PQIndex> pq; in random_test()
115 Mock* top = pq.peek(); in random_test()
[all …]
/external/toolchain-utils/cros_utils/
Ddevice_setup_utils_unittest.py100 mock_cmd_exec = mock.Mock(spec=command_executer.CommandExecuter)
101 mock_logger = mock.Mock(spec=logger.Logger)
157 self.dw.RunCommandOnDut = mock.Mock(return_value=(0, '', ''))
167 self.dw.RunCommandOnDut = mock.Mock(return_value=(0, '', ''))
182 self.dw.RunCommandOnDut = mock.Mock(return_value=(1, '', 'Error.'))
198 self.dw.RunCommandOnDut = mock.Mock(return_value=(1, '', 'Error.'))
214 self.dw.RunCommandOnDut = mock.Mock(return_value=(0, '', ''))
227 self.dw.RunCommandOnDut = mock.Mock(
235 self.dw.RunCommandOnDut = mock.Mock(
266 self.dw.RunCommandOnDut = mock.Mock(return_value=(0, '', ''))
[all …]
/external/python/cpython3/Lib/unittest/test/testmock/
Dtestsealable.py15 m = mock.Mock()
17 self.assertIsInstance(m.test, mock.Mock)
18 self.assertIsInstance(m.test(), mock.Mock)
19 self.assertIsInstance(m.test().test2(), mock.Mock)
22 m = mock.Mock()
31 m = mock.Mock()
38 m = mock.Mock()
46 m = mock.Mock()
54 m = mock.Mock()
62 m = mock.Mock(test_value=1)
[all …]
Dtestmock.py12 MagicMock, Mock, NonCallableMock,
54 mock = Mock()
59 self.assertTrue(is_instance(mock.return_value, Mock),
82 mock = Mock(return_value=None)
103 mock = Mock(name='foo')
107 mocks = [(Mock(), 'mock'), (Mock(name='bar'), 'bar')]
122 mock = Mock(spec=X)
125 mock = Mock(spec=X())
128 mock = Mock(spec_set=X)
131 mock = Mock(spec_set=X())
[all …]
Dtestmagicmethods.py5 from unittest.mock import AsyncMock, Mock, MagicMock, _magics
12 mock = Mock()
15 mock.__getitem__ = Mock()
36 mock = Mock()
50 mock1 = Mock()
51 mock2 = Mock()
53 mock1.__iter__ = Mock(return_value=iter([]))
59 mock = Mock()
66 mock = Mock()
73 mock = Mock()
[all …]
/external/libchrome/components/policy/core/common/
Dschema_registry_unittest.cc15 using ::testing::Mock;
80 Mock::VerifyAndClearExpectations(&observer); in TEST()
87 Mock::VerifyAndClearExpectations(&observer); in TEST()
95 Mock::VerifyAndClearExpectations(&observer); in TEST()
107 Mock::VerifyAndClearExpectations(&observer); in TEST()
121 Mock::VerifyAndClearExpectations(&observer); in TEST()
126 Mock::VerifyAndClearExpectations(&observer); in TEST()
130 Mock::VerifyAndClearExpectations(&observer); in TEST()
153 Mock::VerifyAndClearExpectations(&observer); in TEST()
159 Mock::VerifyAndClearExpectations(&observer); in TEST()
[all …]
Dschema_registry_tracking_policy_provider_unittest.cc21 using testing::Mock;
77 Mock::VerifyAndClearExpectations(&mock_provider_); in TEST_F()
99 Mock::VerifyAndClearExpectations(&observer_); in TEST_F()
109 Mock::VerifyAndClearExpectations(&mock_provider_); in TEST_F()
115 Mock::VerifyAndClearExpectations(&observer_); in TEST_F()
132 Mock::VerifyAndClearExpectations(&observer_); in TEST_F()
138 Mock::VerifyAndClearExpectations(&mock_provider_); in TEST_F()
142 Mock::VerifyAndClearExpectations(&mock_provider_); in TEST_F()
154 Mock::VerifyAndClearExpectations(&observer_); in TEST_F()
178 Mock::VerifyAndClearExpectations(&observer_); in TEST_F()
[all …]
/external/autotest/client/common_lib/cros/cfm/usb/
Dusb_port_manager_unittest.py24 ret = mock.Mock()
40 host = mock.Mock()
41 host.get_board = mock.Mock(return_value='board: guado')
43 host.run = mock.Mock(side_effect=host_run_expected_guado)
44 host.path_exists = mock.Mock(return_value=False)
61 host = mock.Mock()
62 host.get_board = mock.Mock(return_value='board: guado')
64 host.run = mock.Mock(side_effect=host_run_expected_guado)
65 host.path_exists = mock.Mock(return_value=True)
80 host = mock.Mock()
[all …]
/external/chromium-trace/catapult/devil/devil/android/
Dcpu_temperature_test.py25 @mock.patch('devil.android.perf.perf_control.PerfControl', mock.Mock())
28 self.mock_device = mock.Mock(spec=device_utils.DeviceUtils)
30 self.mock_device.adb = mock.Mock(spec=adb_wrapper.AdbWrapper)
38 @mock.patch('devil.android.perf.perf_control.PerfControl', mock.Mock())
40 d = mock.Mock(spec=device_utils.DeviceUtils)
53 @mock.patch('devil.android.perf.perf_control.PerfControl', mock.Mock())
55 invalid_device = mock.Mock(spec=device_utils.DeviceUtils)
80 @mock.patch('devil.android.perf.perf_control.PerfControl', mock.Mock())
82 d = mock.Mock(spec=device_utils.DeviceUtils)
88 @mock.patch('devil.android.perf.perf_control.PerfControl', mock.Mock())
[all …]
/external/googletest/googlemock/test/
Dgmock_link_test.h210 class Mock: public Interface {
212 Mock() {} in Mock() function
225 GTEST_DISALLOW_COPY_AND_ASSIGN_(Mock);
248 Mock mock; in TEST()
256 Mock mock; in TEST()
265 Mock mock; in TEST()
273 Mock mock; in TEST()
282 Mock mock; in TEST()
291 Mock mock; in TEST()
300 Mock mock; in TEST()
[all …]
Dgmock-nice-strict_test.cc40 class Mock { class
42 Mock() {} in Mock() function in Mock
47 GTEST_DISALLOW_COPY_AND_ASSIGN_(Mock);
193 EXPECT_TRUE(Mock::IsNaggy(&raw_foo)); in TEST()
194 EXPECT_FALSE(Mock::IsNice(&raw_foo)); in TEST()
195 EXPECT_FALSE(Mock::IsStrict(&raw_foo)); in TEST()
294 Mock::AllowLeak(leaked); in TEST()
306 NiceMock< ::Mock> nice; in TEST()
320 EXPECT_FALSE(Mock::IsNaggy(&nice_foo)); in TEST()
321 EXPECT_TRUE(Mock::IsNice(&nice_foo)); in TEST()
[all …]
/external/mockito/src/test/java/org/mockitousage/annotation/
DAnnotationsTest.java11 import org.mockito.Mock;
33 @Mock List<?> list;
34 @Mock final Map<Integer, String> map = new HashMap<Integer, String>();
38 @Mock List<?> listTwo;
77 @Mock(answer = Answers.RETURNS_MOCKS, name = "i have a name") IMethods namedAndReturningMocks;
78 @Mock(answer = Answers.RETURNS_DEFAULTS) IMethods returningDefaults;
79 @Mock(extraInterfaces = {List.class}) IMethods hasExtraInterfaces;
80 @Mock() IMethods noExtraConfig;
81 @Mock(stubOnly=true) IMethods stubOnly;
98 @Mock private IMethods mock;
[all …]
/external/chromium-trace/catapult/devil/devil/android/perf/
Dperf_control_test.py42 perf_control_object.SetScalingGovernor = mock.Mock()
43 perf_control_object._ForceAllCpusOnline = mock.Mock()
44 perf_control_object._SetScalingMaxFreqForCpus = mock.Mock()
45 perf_control_object._SetMaxGpuClock = mock.Mock()
51 mock_device = mock.Mock(spec=device_utils.DeviceUtils)
53 mock_device.adb = mock.Mock(spec=adb_wrapper.AdbWrapper)
56 mock_device.RunShellCommand = mock.Mock(side_effect=_ShellCommandHandler)
74 mock_device = mock.Mock(spec=device_utils.DeviceUtils)
76 mock_device.adb = mock.Mock(spec=adb_wrapper.AdbWrapper)
79 mock_device.RunShellCommand = mock.Mock(side_effect=_ShellCommandHandler)
[all …]
/external/androidplot/AndroidPlot-Core/src/test/java/com/androidplot/mock/
DMockRectF.java21 import mockit.Mock;
33 @Mock
38 @Mock
46 @Mock
56 @Mock
68 @Mock
80 @Mock
85 @Mock
90 @Mock
DMockCanvas.java6 import mockit.Mock;
14 @Mock
19 @Mock
24 @Mock
27 @Mock
32 @Mock
/external/llvm-project/llvm/utils/unittest/googlemock/include/gmock/
Dgmock-generated-nice-strict.h87 ::testing::Mock::AllowUninterestingCalls( in NiceMock()
95 ::testing::Mock::AllowUninterestingCalls( in NiceMock()
100 ::testing::Mock::AllowUninterestingCalls( in NiceMock()
106 ::testing::Mock::AllowUninterestingCalls( in NiceMock()
113 ::testing::Mock::AllowUninterestingCalls( in NiceMock()
120 ::testing::Mock::AllowUninterestingCalls( in NiceMock()
128 ::testing::Mock::AllowUninterestingCalls( in NiceMock()
137 ::testing::Mock::AllowUninterestingCalls( in NiceMock()
146 ::testing::Mock::AllowUninterestingCalls( in NiceMock()
155 ::testing::Mock::AllowUninterestingCalls( in NiceMock()
[all …]
/external/python/cpython3/Lib/test/test_asyncio/
Dtest_selector_events.py30 self._ssock = mock.Mock()
31 self._csock = mock.Mock()
55 self.selector = mock.Mock()
61 m = mock.Mock()
62 self.loop.add_reader = mock.Mock()
75 m = mock.Mock()
76 self.loop._add_reader = mock.Mock()
78 self.loop._add_writer = mock.Mock()
79 self.loop._remove_reader = mock.Mock()
80 self.loop._remove_writer = mock.Mock()
[all …]
/external/cbor-java/src/test/java/co/nstant/in/cbor/encoder/
DSpecialEncoderTest.java12 private class Mock extends Special { class in SpecialEncoderTest
14 public Mock(SpecialType specialType) { in Mock() method in SpecialEncoderTest.Mock
29 encoder.encode(new Mock(SpecialType.UNALLOCATED)); in shouldNotEncodeReserved()
34 encoder.encode(new Mock(SpecialType.IEEE_754_DOUBLE_PRECISION_FLOAT)); in shouldVerifyImplementation1()
39 encoder.encode(new Mock(SpecialType.IEEE_754_HALF_PRECISION_FLOAT)); in shouldVerifyImplementation2()
44 encoder.encode(new Mock(SpecialType.IEEE_754_SINGLE_PRECISION_FLOAT)); in shouldVerifyImplementation3()
49 encoder.encode(new Mock(SpecialType.SIMPLE_VALUE_NEXT_BYTE)); in shouldVerifyImplementation4()
/external/angle/src/libANGLE/
DOverlay.h121 const overlay::Mock *getTextWidget(WidgetId id) const { return &mMock; } in getTextWidget()
122 const overlay::Mock *getCountWidget(WidgetId id) const { return &mMock; } in getCountWidget()
123 const overlay::Mock *getPerSecondWidget(WidgetId id) const { return &mMock; } in getPerSecondWidget()
124 const overlay::Mock *getRunningGraphWidget(WidgetId id) const { return &mMock; } in getRunningGraphWidget()
125 const overlay::Mock *getRunningHistogramWidget(WidgetId id) const { return &mMock; } in getRunningHistogramWidget()
130 overlay::Mock mMock;
142 using CountWidget = const overlay::Mock;
143 using PerSecondWidget = const overlay::Mock;
144 using RunningGraphWidget = const overlay::Mock;
145 using RunningHistogramWidget = const overlay::Mock;
[all …]
/external/grpc-grpc/src/csharp/Grpc.Examples.Tests/
DMathClientMockableTest.cs36 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseBlockingUnaryCallCanBeMocked()
46 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseBlockingUnaryCallWithCallOptionsCallCanBeMocked()
56 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseAsyncUnaryCallCanBeMocked()
67 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseClientStreamingCallCanBeMocked()
68 var mockRequestStream = new Moq.Mock<IClientStreamWriter<Num>>(); in ClientBaseClientStreamingCallCanBeMocked()
79 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseServerStreamingCallCanBeMocked()
80 var mockResponseStream = new Moq.Mock<IAsyncStreamReader<Num>>(); in ClientBaseServerStreamingCallCanBeMocked()
91 var mockClient = new Moq.Mock<Math.MathClient>(); in ClientBaseDuplexStreamingCallCanBeMocked()
92 var mockRequestStream = new Moq.Mock<IClientStreamWriter<DivArgs>>(); in ClientBaseDuplexStreamingCallCanBeMocked()
93 var mockResponseStream = new Moq.Mock<IAsyncStreamReader<DivReply>>(); in ClientBaseDuplexStreamingCallCanBeMocked()
/external/python/oauth2client/tests/contrib/django_util/
Dtest_django_storage.py64 filter_mock = mock.Mock(return_value=entities)
65 object_mock = mock.Mock()
78 filter_mock = mock.Mock(return_value=entities)
79 object_mock = mock.Mock()
94 filter_mock = mock.Mock(return_value=entities)
95 object_mock = mock.Mock()
107 entity_mock = mock.Mock(credentials=None)
108 objects = mock.Mock(
109 get_or_create=mock.Mock(return_value=(entity_mock, None)))
127 filter_mock = mock.Mock(return_value=entities)
[all …]
/external/libchrome/base/threading/
Dscoped_blocking_call_unittest.cc51 testing::Mock::VerifyAndClear(&observer_); in TEST_F()
58 testing::Mock::VerifyAndClear(&observer_); in TEST_F()
65 testing::Mock::VerifyAndClear(&observer_); in TEST_F()
70 testing::Mock::VerifyAndClear(&observer_); in TEST_F()
79 testing::Mock::VerifyAndClear(&observer_); in TEST_F()
89 testing::Mock::VerifyAndClear(&observer_); in TEST_F()
99 testing::Mock::VerifyAndClear(&observer_); in TEST_F()
109 testing::Mock::VerifyAndClear(&observer_); in TEST_F()
114 testing::Mock::VerifyAndClear(&observer_); in TEST_F()

12345678910>>...25