Home | History | Annotate | Download | only in common_lib

Lines Matching refs:def

21     def setUp(self):
26 def tearDown(self):
30 def test_ip_to_long(self):
37 def test_long_to_ip(self):
44 def test_create_subnet_mask(self):
50 def test_format_ip_with_mask(self):
61 def create_test_file(self, contents):
66 def test_reads_one_line_file(self):
72 def test_strips_read_lines(self):
78 def test_drops_extra_lines(self):
84 def test_works_on_empty_file(self):
90 def test_works_on_file_with_no_newlines(self):
97 def test_preserves_leading_whitespace(self):
104 def setUp(self):
109 def tearDown(self):
113 def get_write_one_line_output(self, content):
121 def test_writes_one_line_file(self):
125 def test_preserves_existing_newline(self):
129 def test_preserves_leading_whitespace(self):
133 def test_preserves_trailing_whitespace(self):
137 def test_handles_empty_input(self):
142 def setUp(self):
147 def tearDown(self):
151 def test_simple_functionality(self):
161 def setUp(self):
168 def tearDown(self):
172 def create_test_file(self, filename, contents):
178 def read_keyval(self, contents):
186 def test_returns_empty_when_file_doesnt_exist(self):
193 def test_accesses_files_directly(self):
200 def test_accesses_directories_through_keyval_file(self):
207 def test_values_are_rstripped(self):
212 def test_comments_are_ignored(self):
217 def test_integers_become_ints(self):
223 def test_float_values_become_floats(self):
229 def test_multiple_lines(self):
234 def test_the_last_duplicate_line_is_used(self):
239 def test_extra_equals_are_included_in_values(self):
244 def test_non_alphanumeric_keynames_are_rejected(self):
248 def test_underscores_are_allowed_in_key_names(self):
253 def test_dashes_are_allowed_in_key_names(self):
257 def test_empty_value_is_allowed(self):
263 def setUp(self):
269 def tearDown(self):
273 def assertHasLines(self, value, lines):
279 def write_keyval(self, filename, dictionary, expected_filename=None,
294 def write_keyval_file(self, dictionary, type_tag=None):
299 def test_accesses_files_directly(self):
305 def test_accesses_directories_through_keyval_file(self):
311 def test_numbers_are_stringified(self):
316 def test_type_tags_are_excluded_by_default(self):
323 def test_perf_tags_are_allowed(self):
331 def test_non_alphanumeric_keynames_are_rejected(self):
335 def test_underscores_are_allowed_in_key_names(self):
340 def test_dashes_are_allowed_in_key_names(self):
346 def test_accepts_http(self):
350 def test_accepts_ftp(self):
354 def test_rejects_local_path(self):
358 def test_rejects_local_filename(self):
362 def test_rejects_relative_local_path(self):
366 def test_rejects_local_path_containing_url(self):
371 def setUp(self):
375 def tearDown(self):
379 def stub_urlopen_with_timeout_comparison(self, test_func, expected_return,
382 def urlopen(url, data=None):
389 def stub_urlopen_with_timeout_check(self, expected_timeout,
391 def test_func(timeout):
397 def test_timeout_set_during_call(self):
403 def test_timeout_reset_after_call(self):
414 def test_timeout_set_by_default(self):
415 def test_func(timeout):
421 def test_args_are_untouched(self):
428 def setUp(self):
432 def tearDown(self):
436 def test_urlopen_passed_arguments(self):
462 def src(self, *path_segments):
466 def dest(self, *path_segments):
470 def paths(self, *path_segments):
474 def assertFileEqual(self, *path_segments):
482 def assertFileContents(self, contents, *path_segments):
489 def setUp(self):
498 def tearDown(self):
503 def test_both_dont_exist(self):
507 def
513 def test_file_only_at_dest(self):
520 def test_file_at_both(self):
527 def test_directory_with_files_in_both(self):
534 def test_directory_with_mix_of_files(self):
542 def test_directory_with_subdirectories(self):
556 def test_not_absolute(self):
559 def test_same_dir(self):
562 def test_forward_dir(self):
565 def test_previous_dir(self):
568 def test_parallel_dir(self):
574 def _test_in_shell(self, text):
585 def test_normal_string(self):
589 def test_spaced_string(self):
593 def test_dollar(self):
597 def test_single_quote(self):
601 def test_single_quoted_string(self):
605 def test_string_with_single_quote(self):
609 def test_string_with_escaped_single_quote(self):
613 def test_double_quote(self):
617 def test_double_quoted_string(self):
621 def test_backtick(self):
625 def test_backticked_string(self):
629 def test_backslash(self):
633 def test_backslashed_special_characters(self):
640 def test_backslash_codes(self):
649 def test_real_newline(self):
660 def _test_in_shell(self, text):
673 def _test_in_shell(self, text):
688 def setUp(self):
694 def tearDown(self):
698 def __check_result(self, result, command, exit_status=0, stdout='',
706 def test_default_simple(self):
713 def test_default_failure(self):
721 def test_ignore_status(self):
727 def test_timeout(self):
736 def test_stdout_stderr_tee(self):
748 def test_stdin_string(self):
754 def test_safe_args(self):
764 def test_safe_args_given_string(self):
768 def test_wait_interrupt(self):
789 def test_zerofill(self):
795 def test_unequal_len(self):
800 def test_dash_delimited(self):
806 def test_alphabets(self):
812 def test_mix_symbols(self):
823 def test_no_args(self):
828 def test_matches(self):
829 result = base_utils.args_to_dict(['aBc:DeF', 'SyS=DEf', 'XY_Z:',
831 self.assertEqual(result, {'abc':'DeF', 'sys':'DEf', 'xy_z':'',
835 def test_unmatches(self):
843 result = base_utils.args_to_dict(['ab-c:DeF', '--SyS=DEf', 'a*=b', 'a*b',
852 def do_bind(self, port, socket_type, socket_proto):
859 def test_get_port(self):