This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 447
creating pytest to quokkaCMS #667
Open
marcosptf
wants to merge
237
commits into
quokkaproject:master
Choose a base branch
from
marcosptf:feature/pytest
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 221 commits
Commits
Show all changes
237 commits
Select commit
Hold shift + click to select a range
e908411
creating pytest to quokka
marcosptf 91f9e77
add more tests-cli
marcosptf abebf28
add cli tests test_init();
marcosptf 2fdf66a
add test-cli test_runserver();
marcosptf a19c6cd
Merge branch 'master' into feature/pytest
marcosptf 0c3f9e9
removing tests unusual
marcosptf 6c25410
Merge branch 'master' into feature/pytest
marcosptf 7c7255b
removing test_basic
marcosptf 4e6b0ac
add more tests to quokka/__init__.py
marcosptf dfb8e97
add more tests to quokka/__init__.py => done
marcosptf 3329f7a
add more tests to quokka/__init__.py => dones
marcosptf 5b44b2d
test-cli
marcosptf de43db8
pytest - refactory - dir
marcosptf 6c4f3b3
pytest - refactory - dir
marcosptf 5c72394
pytest - refactory - dir
marcosptf 9a56d05
pytest - refactory - dir
marcosptf 557512a
pytest - refactory - dir
marcosptf d5106ef
pytest - refactory - dir
marcosptf d4aa3e4
pytest - refactory - dir
marcosptf a2bfda0
pytest - refactory - dir
marcosptf 2354b97
pytest - refactory - dir
marcosptf 109b50d
pytest - refactory - dir
marcosptf fe68a93
pytest - refactory - dir
marcosptf 836bacc
pytest - refactory - dir
marcosptf 5d5b401
pytest - refactory - dir
marcosptf 6ae62f5
add os.unlink to remote tmp file teardown pytest
marcosptf 6cefd97
add new teste admin-create_admin();
marcosptf bd7ad2a
add more test to tests/admin/
marcosptf 4d9ecd4
fixing or comment tests to running with make test and pep8
marcosptf 18838f4
pytest - review defs comments
marcosptf 8a81b78
test Quokka_configure_admin_param_admin_none
marcosptf 9454653
test Quokka_configure_admin_param_admin_mock_QuokkaAdmin
marcosptf 980f5e9
test create_admin && create_configure_admin();
marcosptf fe8e69d
def quokka.admin.configure_extra_views(app=appQk) && def quokka.admin…
marcosptf 34af6c6
quokka/admin/__init__.py => done
marcosptf 1870fe1
new pytest:WIP def test_PublishAction_class_def_action_toggle_publish…
marcosptf 54146a3
pytest quokka/admin/__init__.py => done
marcosptf 68fa985
pytest quokka/admin/test_actions.py => done
marcosptf 5b3f5aa
pytext exception refactory test in tests/test_cli.py => done
marcosptf ec1fec8
add new pytests structure
marcosptf 6320880
add new pytests structure
marcosptf c97dbda
add new pytests structure
marcosptf 12efb45
add new pytests structure
marcosptf d772ae0
add new pytests structure
marcosptf ca79be7
add new pytests structure
marcosptf dfeb35f
add new pytests structure
marcosptf 7d12a65
add new pytests structure
marcosptf 496b553
add new pytests structure
marcosptf cb9eb13
add new pytests structure
marcosptf 89b6d76
add new pytests structure
marcosptf b31ec34
add new pytests structure
marcosptf 5cbbd98
add new pytests structure
marcosptf 6720422
add new pytests structure
marcosptf f4ba596
add new pytests structure
marcosptf 86cb11b
add new pytests structure
marcosptf 2a52c2a
add new pytests structure
marcosptf 4236519
add new pytests structure
marcosptf 3133db5
add new pytests structure
marcosptf e1f2018
add new pytests structure
marcosptf befda04
add new pytests structure
marcosptf 5c811fd
add new pytests structure
marcosptf 64e60f4
add new pytests structure
marcosptf 1becffe
add new pytests structure
marcosptf cd349d0
add new pytests structure
marcosptf ed19ed6
add new pytests structure
marcosptf c52d9c0
add new pytests structure
marcosptf 937a13d
add new pytests structure
marcosptf 4fba6c3
add new pytests structure
marcosptf fc6b5ec
add new pytests structure
marcosptf 0089a1e
add new pytests structure
marcosptf e23a2da
add new pytests structure
marcosptf 6011153
add new pytests structure
marcosptf 0bc61f9
test_quokka_admin_ajax_unused
marcosptf 54008b9
add codeconv and pytest-cov to quokka pytest coverage
marcosptf 9daa352
add codeconv and pytest-cov to quokka pytest coverage - pytrohn3.6
marcosptf 7b09ec7
add tests to quokka.admin.fields
marcosptf b78eba1
add tests to ContentImageField();
marcosptf 7d14951
add pytest isinstance of to quokka/admin/__init__.py
marcosptf 8fe95e8
add pytest isinstance of to quokka/admin/test_actions.py
marcosptf c6c75a1
add pytest isinstance of to quokka/admin/test_fields.py
marcosptf f3f1b2b
add pytest isinstance of to quokka/admin/test_views.py
marcosptf b99c344
add pytest fixtures setUp()
marcosptf 49b3fc8
add quokka/admin/test_formatters.py
marcosptf a1e37df
add pytests to quokka/admin/test_formatters.py
marcosptf abc4055
fixing pytest test_SmartSelect2Field_class_assert_creation_counter_pr…
marcosptf 971677b
fixing pytest test_ThumbField_creation_counter_property();
marcosptf 3ce9f2e
fixing pytest test_ContentImageField_get_kwargs_property();
marcosptf 78bed74
code refactory add pytest-fixtures to =>tests/admin/test__init__.py
marcosptf e9826b9
code refactory add pytest-fixtures to =>tests/admin/test_actions.py
marcosptf 049102c
code refactory add pytest-fixtures to =>tests/admin/test_fields.py
marcosptf 4b28d7f
code refactory add pytest-fixtures to =>tests/admin/test_formatters.py
marcosptf 586cc67
code refactory add pytest-fixtures to =>tests/admin/test_views.py
marcosptf cdc2c57
code refactory add pytest-fixtures to =>tests/conftest.py
marcosptf 784bd49
code refactory add pytest-fixtures to =>tests/test__init__.py
marcosptf 1085fa1
code refactory add pytest-fixtures to =>tests/test_cli.py
marcosptf c8490bd
add tests to => quokka.admin.views.IndexView();
marcosptf eb1b11a
fixing pep8 identing
marcosptf 087091e
code refactory - remove property self from functions that is not clas…
marcosptf 90d6d44
fixing import errors
marcosptf 624de39
pytest test_forms.py
marcosptf 301da1b
add pytest quokka.admin.fields.CallableValidator();
marcosptf 68bec1a
test_views.py WIP:
marcosptf c64dfb0
remove debugger code WIP from test_forms.py
marcosptf 1a7e787
remove debugger code WIP from test_views.py
marcosptf 226eb50
writing pytest to b/tests/admin/test_formatters.py def test_format_da…
marcosptf 2ac1d3a
fixing git merge conflicts
marcosptf 9585a6b
add pytest to quokka.admin.formatters.py
marcosptf 88b22c1
fixing import
marcosptf c689b29
add test to quokka.admin.widgets
marcosptf 35a2ebe
add pytest to quokka.admin.wtforms_html5
marcosptf dc8ad7a
fixing comment to wrong import
marcosptf de97828
pytest tests/core/content/tests*.py refactory
marcosptf fd2fe53
pytest tests/core/content/tests*.py refactory - add pytest files
marcosptf b96bdc6
pytest add test.quokka.core.content.test_admin.py
marcosptf 31c72bc
pytest:tests/core/__init__.py
marcosptf da0ff32
pytest:tests/core/content/test_admin.py
marcosptf 4e3e44e
WIP: tests/core/content/test_admin.py:test_AdminContentView
marcosptf 6f4a89b
WIP: tests/core/content/test_admin.py
marcosptf 8f84540
pytest tests/core/content/test_formats.py
marcosptf 4007f81
pytest tests/core/content/test_models.py
marcosptf b07f2e7
pytest tests/core/views/test_sitemap.py
marcosptf d87470d
pytest tests/module_template/quokka_module_template/
marcosptf db6cbfb
pytest tests/core/content/test_paginator.py
marcosptf ea9c01d
pytest tests/core/content/test_parsers.py
marcosptf 8b78ec9
pytest tests/core/content/test_utils.py
marcosptf cc00bfe
pytest tests/core/content/test_views.py
marcosptf 02fdd91
pytest tests/core/test_app.py
marcosptf c2d3253
pytest tests/core/test_auth.py
marcosptf 282a43d
pytest tests/core/test_blueprints.py
marcosptf 657fc0c
pytest tests/core/test_commands_collector.py
marcosptf f303469
pytest tests/core/test_context_processors.py
marcosptf 6816374
pytest tests/core/test_db.py
marcosptf aa4b459
pytest tests/core/test_error_handlers.py
marcosptf 681b8fe
pytest tests/core/test_flask_dynaconf.py
marcosptf 4250c0c
pytest tests/core/test_flask_dynaconf.py
marcosptf 0a23a58
pytest tests/core/test_logger.py
marcosptf eaa547a
tests/core/test_monitoring.py
marcosptf 54dd97c
pytest tests/core/test_regex_url_support.py
marcosptf 77326bb
pytest tests/core/test_template_filters.py
marcosptf 66f4d07
pytest tests/core/test_themes.py
marcosptf 39f260a
pytest remove wrong file tests/core/test_themes.py
marcosptf 8854c54
pytest remove wrong file tests/core/views/sitemap.py
marcosptf c0cd8fa
pytest tests/module_template/test_setup.py
marcosptf ccc3959
pytest tests/test_cli.py
marcosptf 8301cb6
pytest tests/utils/test_atom.py
marcosptf 0e33041
pytest tests/utils/test_blocks.py
marcosptf e34f673
pytest removing wrong file tests/utils/test_custom_dateformat.py
marcosptf 45d369a
pytest tests/utils/test_custom_vars.py
marcosptf e8c60eb
pytest tests/utils/test_dateformat.py
marcosptf 034b436
pytest tests/utils/test_echo.py
marcosptf 876015f
tests/utils/test_project.py
marcosptf 4847cd4
pytest tests/utils/test_routing.py
marcosptf d558239
pytest tests/utils/test_text.py
marcosptf 2d0c392
pytest tests/utils/test_upload.py
marcosptf 7745717
fixing imports tests/core/test_context_processors.py
marcosptf 1e3600f
fixing imports tests/core/content/test_views.py
marcosptf a2f01b5
fixing imports tests/utils/test_project.py
marcosptf a636bd5
remove import unused
marcosptf 2da9743
remove unused lines
marcosptf c76da13
code refactory and add more tests to tests/core/__init__.py
marcosptf 2931631
add more tests to tests/core/test__init__.py
marcosptf ea053a5
add pytest to tests/core/__init__.py
marcosptf 4e2e694
add pytest to tests/core/__init__.py fixing imports spaces removing tabs
marcosptf f0e6e80
add pytest tests/core/test_app.py
marcosptf 48deb54
add pytest to tests/core/test_app.py
marcosptf f9c99c6
add pytest tests/core/content/test_admin.py::test_AdminContentView
marcosptf 4c58c23
add tests/core/content/test_admin.py more pytests which real mocks c…
marcosptf 9f6f8f4
add more verbosity to pytest
marcosptf 5fc9d5d
remove comments unused
marcosptf 68ee2f1
add pytest headers to tests/core/content/test_formats_.py and remove …
marcosptf 3c2e0a1
pytest - tests/core/content/test_formats.py
marcosptf 82ffa06
pytest - tests/core/content/test_formats.py
marcosptf 1755c2a
pytest - tests/core/content/test_formats.py - test_validate_category_…
marcosptf d13c501
pytest - tests/core/content/test_formats.py - done
marcosptf 7574fba
code refactor from TestClassPytestExtendsAdminContentView to MockTest…
marcosptf 33ee5d4
code refactory remove pytest warnings MockTestAdminArticlesView
marcosptf 5145c8a
fixing warning pytest MockTestAdminPagesView
marcosptf 316a239
code refactory fixing warnings in pytest code TestAdminBlocksView
marcosptf 2e980fc
remove validation pep8 from make test temporary
marcosptf 68eb47c
pytest tests/core/content/test_models.py::Orderable();
marcosptf f13f801
pytest tests/core/content/test_models.py::Category();
marcosptf e5f5833
pytest tests/core/content/test_models.py::Url();
marcosptf 1a29a56
pytest tests/core/content/test_models.py::Authors();
marcosptf 5d966ab
pytest tests/core/content/test_models.py::Tag();
marcosptf 52aab92
pytest tests/core/content/test_models.py::Article();
marcosptf ee1bbc5
pytest tests/core/content/test_models.py::Page();
marcosptf a35471d
pytest tests/core/content/test_models.py::Block();
marcosptf 748c75d
pytest tests/core/content/test_models.py::BlockItem();
marcosptf 018ac73
pytest tests/core/content/test_models.py - code refactory;
marcosptf 710c0fa
pytest tests/core/content/test_models.py - code refactory2;
marcosptf bda0317
pytest tests/core/test_app.py - code refactory;
marcosptf 20c8b15
pytest tests/core/views/test_sitemap.py
marcosptf 2a74bc5
tests/core/content/test_views.py - code refactory imports
marcosptf e2008f0
pytest tests/core/content/test_views.py - BaseView();
marcosptf 82f6ef9
pytest tests/core/content/test_views.py - done
marcosptf ca58975
pytest - tests/core/content/test_utils.py
marcosptf 5d201a7
pytest - tests/core/content/test_parsers.py
marcosptf a2288b4
pytest - tests/core/content/test_paginator.py
marcosptf 40edb96
pytest - tests/core/test_auth.py
marcosptf 5f362ae
pytest - tests/core/test_commands_collector.py
marcosptf 0151817
tests/core/test_error_handlers.py
marcosptf bea9523
pytest - tests/core/test_monitoring.py
marcosptf 7217853
pytest - tests/core/test_template_filters.py
marcosptf caafca6
pytest - tests/module_template/quokka_module_template/test_admin.py
marcosptf 9c89088
pytest - tests/module_template/quokka_module_template/test_admin.py -
marcosptf 9be4452
pytest - tests/utils/test_atom.py
marcosptf b4a6632
pytest - tests/utils/test_atom.py
marcosptf 8d257ce
pytest - tests/utils/test_custom_vars.py
marcosptf 60f361f
pytest - tests/utils/test_custom_vars.py - split-category
marcosptf 3bfa29c
finish pytest to quokka
marcosptf cbd3214
pytest - code refacory
marcosptf e813fe3
Delete tqdm.1
marcosptf 3ee8314
Delete pip-selfcheck.json
marcosptf 10045ac
finish code refactory feature/pytest
marcosptf 2ea8aef
Merge branch 'feature/pytest' of https://github.com/marcosptf/quokka …
marcosptf b1f221e
Merge branch 'master' of https://github.com/rochacbruno/quokka into f…
marcosptf 345eed9
rollback quokka/admin/formatters.py to original from master branch
marcosptf a196262
rollback quokka/admin/widgets.py to original from master branch
marcosptf def4765
fixing quokka/admin/widgets.py that had a wrong import => from quokka…
marcosptf 323e196
fixing pep8
marcosptf db56808
fixing pep8 - makefile
marcosptf 1a1c4f5
@laerteallan pep8 + code refactory done
marcosptf 0fa91fc
@laerteallan pep8 + code refactory done2
marcosptf 568d9ac
@laerteallan pep8 + code refactory done3
marcosptf cfb65c5
Merge branch 'master' into feature/pytest
marcosptf 4fa0c64
fixing test to be more resilent!
76b18fb
Delete pyvenv.cfg
marcosptf 35728dd
Delete ipython.1.gz
marcosptf 211d5c8
fixing pep8 => tests/admin/test__init__.py
marcosptf 574b439
fixing pep8 - quokka/core/content/models.py - quokka/core/db.py
marcosptf 92552c6
ficing pep8 => quokka/core/db.py
marcosptf cf97137
fixing pep8 => quokka/core/db.py - 2
marcosptf 09cd5e8
fixing pep8 => quokka/core/db.py - 3
marcosptf b548335
fixing pep8 => quokka/core/db.py - 3
marcosptf 34dbd83
fixing pep8 => quokka/core/db.py - 5
marcosptf 3a2896b
fixing pep8 => quokka/core/db.py - 6
marcosptf 7f02761
fixing pep8 => quokka/admin/wtforms_html5.py - quokka/utils/upload.py
marcosptf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,3 +89,4 @@ docs/book | |
.eggs | ||
|
||
README.rst | ||
/nbproject/private/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,10 @@ def url_for_content(content, include_ext=True): | |
else: | ||
data = content | ||
|
||
data_category_slug = data.get('category_slug') | ||
data_slugify_category = slugify_category(data.get('category') or '') | ||
category_slug = ( | ||
data.get('category_slug') or | ||
slugify_category(data.get('category') or '') | ||
data_category_slug or data_slugify_category | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixing pep8 error: |
||
slug = data.get('slug') or slugify(data.get('title')) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -259,6 +259,9 @@ def render_rss(self, content_type, templates, **context): | |
if content.date > rss_pubdate: | ||
rss_pubdate = content.date | ||
|
||
content_title = content.title.encode('utf-8') | ||
content_url = content.url.encode('utf-8') | ||
|
||
rss.items.append( | ||
pyrss.RSSItem( | ||
title=content.title, | ||
|
@@ -267,8 +270,7 @@ def render_rss(self, content_type, templates, **context): | |
author=str(content.author), | ||
categories=[str(content.tags)], | ||
guid=hashlib.sha1( | ||
content.title.encode('utf-8') + | ||
content.url.encode('utf-8') | ||
content_title + content_url | ||
).hexdigest(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixing pep8 error: |
||
pubDate=content.date, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,13 @@ def get_contents(self): | |
TODO: Should include extra paths, fixed paths | ||
config based paths, static paths | ||
""" | ||
index = self.get_index() | ||
cat = self.get_categories() | ||
tags = self.get_tags() | ||
authors = self.get_authors() | ||
articles = self.get_articles_and_pages() | ||
return ( | ||
self.get_index() + | ||
self.get_categories() + | ||
self.get_tags() + | ||
self.get_authors() + | ||
self.get_articles_and_pages() | ||
index + cat + tags + authors + articles | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixing pep8 error: |
||
|
||
def get_index(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,7 @@ twine>=1.9.1 | |
wheel>=0.30.0 | ||
flask>=1.0 | ||
logzero | ||
pytest_mock | ||
mock | ||
pytest_django | ||
pyyaml |
Empty file.
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixing pep8 import