Lines Matching refs:sentinel
5 from unittest.mock import MagicMock, Mock, patch, sentinel, mock_open, call
9 something = sentinel.Something
10 something_else = sentinel.SomethingElse
19 with patch('%s.something' % __name__, sentinel.Something2):
20 self.assertEqual(something, sentinel.Something2, "unpatched")
21 self.assertEqual(something, sentinel.Something)
26 with patch('%s.something' % __name__, sentinel.Something2):
27 self.assertEqual(something, sentinel.Something2, "unpatched")
29 self.assertEqual(something, sentinel.Something)
37 self.assertEqual(something, sentinel.Something)
56 self.assertEqual(something, sentinel.Something)
57 self.assertEqual(something_else, sentinel.SomethingElse)
61 with patch('%s.something' % __name__, sentinel.Patched) as mock_something:
63 self.assertEqual(mock_something, sentinel.Patched, "wrong patch")
64 self.assertEqual(something, sentinel.Something)
90 with patch('%s.something' % __name__, sentinel.Patched) as mock_something:
99 self.assertEqual(something, sentinel.Something, "not restored")
110 self.assertEqual(something, sentinel.Something)
111 self.assertEqual(something_else, sentinel.SomethingElse)