def test_compiled_essid_regex_with_a_case_insensitive_regex(self): """ Tests 'compiled_essid_regex' with a case-insensitive regex. """ config = Config() config.essid_regex = "Free Wi-Fi" config.ignore_case = True with self.assertLogs(self.logger, level=logging.DEBUG): compiled_regex = config.compiled_essid_regex self.assertEqual(compiled_regex, rcompile( config.essid_regex, IGNORECASE))
def test_compile_essid_regex_with_a_case_insensitive_regex(self): """ Tests 'complile_essid_regex' with a case-insensitive regex. """ from re import compile as rcompile, IGNORECASE config = Config() config.essid_regex = "Free Wi-Fi" config.ignore_case = True compiled_regex = config.complile_essid_regex() self.assertEqual(compiled_regex, rcompile(config.essid_regex, IGNORECASE))