'Test that devices boundaries don\'t get crossed, also by default.'

def testFindActionCrossDev(self):

    pathspec = rdf_paths.PathSpec(path='/mock2/', pathtype=rdf_paths.PathSpec.PathType.OS)
    request = rdf_client.FindSpec(pathspec=pathspec, cross_devs=True, path_regex='.')
    request.iterator.number = 200
    results = self.RunAction(searching.Find, request)
    all_files = [x.hit for x in results if isinstance(x, rdf_client.FindSpec)]
    self.assertEqual(len(all_files), 9)
    request = rdf_client.FindSpec(pathspec=pathspec, cross_devs=False, path_regex='.')
    request.iterator.number = 200
    results = self.RunAction(searching.Find, request)
    all_files = [x.hit for x in results if isinstance(x, rdf_client.FindSpec)]
    self.assertEqual(len(all_files), 7)
    request = rdf_client.FindSpec(pathspec=pathspec, path_regex='.')
    request.iterator.number = 200
    results = self.RunAction(searching.Find, request)
    all_files = [x.hit for x in results if isinstance(x, rdf_client.FindSpec)]
    self.assertEqual(len(all_files), 7)
