Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@file_data('test_data_urls.json')
def test_post_id_match(self, test_url):
post_id = get_post_id_from_fb_url(test_url)
self.assertEqual(
post_id,
expected_post_id,
'post_id {0} did not match expected id {1} '.format(post_id, expected_post_id))
@file_data('sample-passwords.json')
def test_content_containing_special_chars_with_password_that_is(self, pwd):
self._encrypt("""!@#$%^&*()_+_+[]\{}|;':",./<>?""", pwd)
@file_data('test_data_list.yaml')
def test_file_data_yaml_list(self, value):
self.assertTrue(is_a_greeting(value))
@file_data('datadriven_users.json')
def test_wrong_login_file(self, user):
self.common_wrong_login(user)
@file_data("test_data_dict_dict.yaml")
def test_file_data_yaml_dict_dict(self, start, end, value):
self.assertLess(start, end)
self.assertLess(value, end)
self.assertGreater(value, start)
@file_data("test_data_dict_dict.json")
def test_file_data_json_dict_dict(self, start, end, value):
self.assertLess(start, end)
self.assertLess(value, end)
self.assertGreater(value, start)
@ddt.file_data("cli_data.yaml")
def test_cli(self, sql, exitcode, stdout, stderr):
# We have '\n' in the YAML file, but '\r\n' is printed on Windows.
stdout = stdout.replace("\n", os.linesep)
stderr = stderr.replace("\n", os.linesep)
ret, out, err = run_cmd(["sqlitis", sql])
self.assertEqual(ret, exitcode)
self.assertEqual(out, stdout)
self.assertEqual(err, stderr)
@file_data('test_data_urls.json')
def test_page_name_match(self, test_url):
page_name = get_page_name_from_fb_url(test_url)
self.assertEqual(
page_name,
expected_page_name,
'page_name {0} did not match expected name {1} '.format(page_name, expected_page_name))
@file_data("test_data_dict_missing.yaml")
def test_something_again(self, value):
return value