Lines Matching +full:mock +full:- +full:tests
3 # Use of this source code is governed by a BSD-style license that can be
7 # pylint: disable=protected-access
9 """Tests bug filing bits."""
17 import unittest.mock
25 class Tests(unittest.TestCase): class
26 """Tests for the bugs module."""
29 """Tests JSON file writing."""
53 with open(file_path, encoding="utf-8") as f:
67 @unittest.mock.patch.object(bugs, "_WriteBugJSONFile")
69 """Tests AppendToExistingBug."""
80 @unittest.mock.patch.object(bugs, "_WriteBugJSONFile")
82 """Tests CreateNewBug."""
129 @unittest.mock.patch.object(bugs, "_WriteBugJSONFile")
131 """Tests SendCronjobLog."""
143 @unittest.mock.patch.object(bugs, "_WriteBugJSONFile")
147 """Tests SendCronjobLog."""
162 @unittest.mock.patch.object(bugs, "_WriteBugJSONFile")
166 """Tests SendCronjobLog."""
180 """Tests that _FileNameGenerator gives us sorted file names."""
187 """Tests that _FileNameGenerator gives us sorted file names."""
195 all_9s = "9" * (gen._ENTROPY_STR_SIZE - 1)
203 @unittest.mock.patch.object(os, "getpid")
205 """Tests that _FileNameGenerator gives us sorted file names."""
217 @unittest.mock.patch.object(bugs, "_WriteBugJSONFile")
222 unittest.mock.ANY, unittest.mock.ANY, directory
228 unittest.mock.ANY, unittest.mock.ANY, directory
234 unittest.mock.ANY, unittest.mock.ANY, directory