blob: 4080b8a28701a288b096de430a60d00b28fc6114 [file] [log] [blame]
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Test that the fuzzer works the way ClusterFuzz invokes it."""
import glob
import os
import shutil
import sys
import tempfile
import unittest
import setup
class WebBluetoothFuzzerTest(unittest.TestCase):
def setUp(self):
self._output_dir = tempfile.mkdtemp()
self._resources_path = setup.RetrieveResources()
def tearDown(self):
def testCanGenerate100Files(self):
sys.argv = ['', '--no_of_files=100',
import fuzz_main_run
written_files = glob.glob(os.path.join(self._output_dir, '*.html'))
self.assertEquals(100, len(written_files), 'Should have written 100 '
'test files.')
for test_case in written_files:
self.assertFalse('TRANSFORM' in open(test_case).read())
if __name__ == '__main__':