From 23dfdc438c98a3943964ff923570193e9d918cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvaro=20Andr=C3=A9s=20Rodr=C3=ADguez=20Scelza?= Date: Wed, 12 Jun 2019 11:31:40 -0300 Subject: [PATCH] testing for two new hooks changed name of testing files folder for testing samples... updated all paths using it --- .coveragerc | 2 +- .../general_hooks/check_using_pylint_test.py | 2 +- .../check_model_name_test.py | 25 +++++++++++++++++++ .../check_view_fields_order_test.py | 25 +++++++++++++++++++ .../__init__.py | 0 .../check_class_docstring_samples/__init__.py | 0 .../docstring_error_1.py | 0 .../docstring_error_2.py | 0 .../docstring_error_3.py | 0 .../docstring_error_4.py | 0 .../docstring_error_5.py | 0 .../docstring_error_6.py | 0 .../docstring_error_7.py | 0 .../docstring_ok.py | 0 .../check_line_samples/__init__.py | 0 .../check_line_samples/xml_lines_error_1.xml | 0 .../check_line_samples/xml_lines_ok.xml | 0 .../check_location_samples/__init__.py | 0 .../javascript/correct_js.js | 0 .../not_enabled_directory/incorrect_xml.xml | 0 .../xml/correct_xml.xml | 0 .../xml/incorrect_js.js | 0 .../check_model_name_samples}/__init__.py | 0 .../check_model_name_samples/error.py | 2 ++ .../multiple_inheritance_ok.py | 2 ++ .../check_model_name_samples/ok.py | 2 ++ .../check_using_pylint_samples/.pylintrc | 0 .../check_using_pylint_samples}/__init__.py | 0 .../check_using_pylint_samples/correct.py | 0 .../check_using_pylint_samples/incorrect.py | 0 .../incorrect_but_ignored.py | 0 .../__init__.py | 0 .../first_field_not_name_error.xml | 9 +++++++ .../check_view_fields_order_samples}/ok.xml | 0 .../second_field_not_model_error.xml | 9 +++++++ .../check_xml_encoding_samples/__init__.py | 0 .../first_line_is_empty_space.xml | 0 .../no_encoding.xml | 0 .../check_xml_encoding_samples/ok.xml | 9 +++++++ .../automatic_testing/util/test_helpers.py | 2 +- 40 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 pre_commit_hooks/loaderon_hooks/tests/automatic_testing/odoo_specific_hooks/check_model_name_test.py create mode 100644 pre_commit_hooks/loaderon_hooks/tests/automatic_testing/odoo_specific_hooks/check_view_fields_order_test.py rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/__init__.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_class_docstring_samples/__init__.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_class_docstring_samples/docstring_error_1.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_class_docstring_samples/docstring_error_2.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_class_docstring_samples/docstring_error_3.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_class_docstring_samples/docstring_error_4.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_class_docstring_samples/docstring_error_5.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_class_docstring_samples/docstring_error_6.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_class_docstring_samples/docstring_error_7.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_class_docstring_samples/docstring_ok.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_line_samples/__init__.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_line_samples/xml_lines_error_1.xml (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_line_samples/xml_lines_ok.xml (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_location_samples/__init__.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_location_samples/javascript/correct_js.js (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_location_samples/not_enabled_directory/incorrect_xml.xml (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_location_samples/xml/correct_xml.xml (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_location_samples/xml/incorrect_js.js (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files/check_using_pylint_samples => testing_samples/check_model_name_samples}/__init__.py (100%) create mode 100644 pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/error.py create mode 100644 pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/multiple_inheritance_ok.py create mode 100644 pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/ok.py rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_using_pylint_samples/.pylintrc (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files/check_xml_encoding_samples => testing_samples/check_using_pylint_samples}/__init__.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_using_pylint_samples/correct.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_using_pylint_samples/incorrect.py (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_using_pylint_samples/incorrect_but_ignored.py (100%) create mode 100644 pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/__init__.py create mode 100644 pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/first_field_not_name_error.xml rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files/check_xml_encoding_samples => testing_samples/check_view_fields_order_samples}/ok.xml (100%) create mode 100644 pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/second_field_not_model_error.xml create mode 100644 pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_xml_encoding_samples/__init__.py rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_xml_encoding_samples/first_line_is_empty_space.xml (100%) rename pre_commit_hooks/loaderon_hooks/tests/automatic_testing/{testing_files => testing_samples}/check_xml_encoding_samples/no_encoding.xml (100%) create mode 100644 pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_xml_encoding_samples/ok.xml diff --git a/.coveragerc b/.coveragerc index a7e2dfd..9458a0e 100644 --- a/.coveragerc +++ b/.coveragerc @@ -6,7 +6,7 @@ omit = .tox/* /usr/* setup.py - pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/* + pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/* [report] show_missing = True diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/general_hooks/check_using_pylint_test.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/general_hooks/check_using_pylint_test.py index cd66d5f..dcb00ba 100644 --- a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/general_hooks/check_using_pylint_test.py +++ b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/general_hooks/check_using_pylint_test.py @@ -32,7 +32,7 @@ def test_with_pylint_error(): def walk_return(folder_path): - root = '/home/administrador/Escritorio/pre-commit-hooks/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_using_pylint_samples' + root = '/home/administrador/Escritorio/pre-commit-hooks/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_using_pylint_samples' unused_dirs = [] files = ['.pylintrc'] return [(root, unused_dirs, files)] diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/odoo_specific_hooks/check_model_name_test.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/odoo_specific_hooks/check_model_name_test.py new file mode 100644 index 0000000..14d1e57 --- /dev/null +++ b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/odoo_specific_hooks/check_model_name_test.py @@ -0,0 +1,25 @@ +import sys + +import pytest + +from pre_commit_hooks.loaderon_hooks.odoo_specific_hooks.check_model_name import main +from pre_commit_hooks.loaderon_hooks.tests.automatic_testing.util.test_helpers import \ + perform_test_on_file_expecting_result + + +@pytest.fixture(autouse=True) +def clean_sys_argv(): + sys.argv = [] + yield + + +def test_check_model_name_ok(): + perform_test_on_file_expecting_result('check_model_name_samples/ok.py', main) + + +def test_check_model_name_multiple_inheritance_ok(): + perform_test_on_file_expecting_result('check_model_name_samples/multiple_inheritance_ok.py', main) + + +def test_check_model_name_error(): + perform_test_on_file_expecting_result('check_model_name_samples/error.py', main, expected_result=2) diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/odoo_specific_hooks/check_view_fields_order_test.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/odoo_specific_hooks/check_view_fields_order_test.py new file mode 100644 index 0000000..b468859 --- /dev/null +++ b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/odoo_specific_hooks/check_view_fields_order_test.py @@ -0,0 +1,25 @@ +import sys + +import pytest + +from pre_commit_hooks.loaderon_hooks.odoo_specific_hooks.check_view_fields_order import main +from pre_commit_hooks.loaderon_hooks.tests.automatic_testing.util.test_helpers import \ + perform_test_on_file_expecting_result + + +@pytest.fixture(autouse=True) +def clean_sys_argv(): + sys.argv = [] + yield + + +def test_check_view_fields_order_ok(): + perform_test_on_file_expecting_result('check_view_fields_order_samples/ok.xml', main) + + +def test_check_view_fields_order_name_error(): + perform_test_on_file_expecting_result('check_view_fields_order_samples/first_field_not_name_error.xml', main, expected_result=2) + + +def test_check_view_fields_order_model_error(): + perform_test_on_file_expecting_result('check_view_fields_order_samples/second_field_not_model_error.xml', main, expected_result=2) diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/__init__.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/__init__.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/__init__.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/__init__.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/__init__.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/__init__.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/__init__.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/__init__.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_1.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_1.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_1.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_1.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_2.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_2.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_2.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_2.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_3.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_3.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_3.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_3.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_4.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_4.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_4.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_4.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_5.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_5.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_5.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_5.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_6.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_6.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_6.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_6.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_7.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_7.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_error_7.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_error_7.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_ok.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_ok.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_class_docstring_samples/docstring_ok.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_class_docstring_samples/docstring_ok.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_line_samples/__init__.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_line_samples/__init__.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_line_samples/__init__.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_line_samples/__init__.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_line_samples/xml_lines_error_1.xml b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_line_samples/xml_lines_error_1.xml similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_line_samples/xml_lines_error_1.xml rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_line_samples/xml_lines_error_1.xml diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_line_samples/xml_lines_ok.xml b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_line_samples/xml_lines_ok.xml similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_line_samples/xml_lines_ok.xml rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_line_samples/xml_lines_ok.xml diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_location_samples/__init__.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_location_samples/__init__.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_location_samples/__init__.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_location_samples/__init__.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_location_samples/javascript/correct_js.js b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_location_samples/javascript/correct_js.js similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_location_samples/javascript/correct_js.js rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_location_samples/javascript/correct_js.js diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_location_samples/not_enabled_directory/incorrect_xml.xml b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_location_samples/not_enabled_directory/incorrect_xml.xml similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_location_samples/not_enabled_directory/incorrect_xml.xml rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_location_samples/not_enabled_directory/incorrect_xml.xml diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_location_samples/xml/correct_xml.xml b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_location_samples/xml/correct_xml.xml similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_location_samples/xml/correct_xml.xml rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_location_samples/xml/correct_xml.xml diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_location_samples/xml/incorrect_js.js b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_location_samples/xml/incorrect_js.js similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_location_samples/xml/incorrect_js.js rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_location_samples/xml/incorrect_js.js diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_using_pylint_samples/__init__.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/__init__.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_using_pylint_samples/__init__.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/__init__.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/error.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/error.py new file mode 100644 index 0000000..f7099e5 --- /dev/null +++ b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/error.py @@ -0,0 +1,2 @@ +class SomeClass(object): + _name = "some.model.name" diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/multiple_inheritance_ok.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/multiple_inheritance_ok.py new file mode 100644 index 0000000..e4a76f0 --- /dev/null +++ b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/multiple_inheritance_ok.py @@ -0,0 +1,2 @@ +class SomeClass(object): + _inherit = ['some_model_name', 'some_other_model_name'] diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/ok.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/ok.py new file mode 100644 index 0000000..8fd6299 --- /dev/null +++ b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_model_name_samples/ok.py @@ -0,0 +1,2 @@ +class SomeClass(object): + _name = "testing_files.some.model.name" diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_using_pylint_samples/.pylintrc b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_using_pylint_samples/.pylintrc similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_using_pylint_samples/.pylintrc rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_using_pylint_samples/.pylintrc diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_xml_encoding_samples/__init__.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_using_pylint_samples/__init__.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_xml_encoding_samples/__init__.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_using_pylint_samples/__init__.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_using_pylint_samples/correct.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_using_pylint_samples/correct.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_using_pylint_samples/correct.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_using_pylint_samples/correct.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_using_pylint_samples/incorrect.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_using_pylint_samples/incorrect.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_using_pylint_samples/incorrect.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_using_pylint_samples/incorrect.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_using_pylint_samples/incorrect_but_ignored.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_using_pylint_samples/incorrect_but_ignored.py similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_using_pylint_samples/incorrect_but_ignored.py rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_using_pylint_samples/incorrect_but_ignored.py diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/__init__.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/first_field_not_name_error.xml b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/first_field_not_name_error.xml new file mode 100644 index 0000000..bec43f3 --- /dev/null +++ b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/first_field_not_name_error.xml @@ -0,0 +1,9 @@ + + + + + Jhon Doe + some.model + + + diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_xml_encoding_samples/ok.xml b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/ok.xml similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_xml_encoding_samples/ok.xml rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/ok.xml diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/second_field_not_model_error.xml b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/second_field_not_model_error.xml new file mode 100644 index 0000000..9199808 --- /dev/null +++ b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_view_fields_order_samples/second_field_not_model_error.xml @@ -0,0 +1,9 @@ + + + + + some.model.form.inherit + Jhon Doe + + + diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_xml_encoding_samples/__init__.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_xml_encoding_samples/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_xml_encoding_samples/first_line_is_empty_space.xml b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_xml_encoding_samples/first_line_is_empty_space.xml similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_xml_encoding_samples/first_line_is_empty_space.xml rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_xml_encoding_samples/first_line_is_empty_space.xml diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_xml_encoding_samples/no_encoding.xml b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_xml_encoding_samples/no_encoding.xml similarity index 100% rename from pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_files/check_xml_encoding_samples/no_encoding.xml rename to pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_xml_encoding_samples/no_encoding.xml diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_xml_encoding_samples/ok.xml b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_xml_encoding_samples/ok.xml new file mode 100644 index 0000000..3b054a5 --- /dev/null +++ b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/testing_samples/check_xml_encoding_samples/ok.xml @@ -0,0 +1,9 @@ + + + + + some.model.form.inherit + some.model + + + diff --git a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/util/test_helpers.py b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/util/test_helpers.py index 3107e89..b776841 100644 --- a/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/util/test_helpers.py +++ b/pre_commit_hooks/loaderon_hooks/tests/automatic_testing/util/test_helpers.py @@ -4,7 +4,7 @@ import sys def get_sample_file_path(file_name): current_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - testing_files_folder_path = current_path + '/testing_files/' + testing_files_folder_path = current_path + '/testing_samples/' return testing_files_folder_path + file_name