-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move 'view' tests from grok to grokcore.view
- Loading branch information
Showing
45 changed files
with
155 additions
and
112 deletions.
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from grokcore.view.tests.components import Model, View | ||
from grokcore.view import testing | ||
from grokcore.component import name |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
* move namemultiple, nameunicode, nomodulename from tests/view to grokcore.component |
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
19 changes: 12 additions & 7 deletions
19
...ok/tests/view/explicitimplicittemplate.py → ...ew/tests/view/explicitimplicittemplate.py
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 |
---|---|---|
@@ -1,25 +1,30 @@ | ||
""" | ||
It is too confusing to have a template that would be implicitly | ||
associated with a view while that view already refers to another | ||
template using grok.template. Therefore there is an error: | ||
template using grokcore.view.template. Therefore there is an error: | ||
>>> grok.testing.grok(__name__) | ||
Traceback (most recent call last): | ||
... | ||
ConfigurationExecutionError: martian.error.GrokError: Multiple possible templates for view | ||
<class 'grok.tests.view.explicitimplicittemplate.Painting'>. | ||
<class 'grokcore.view.tests.view.explicitimplicittemplate.Painting'>. | ||
It uses grok.template('cavepainting'), but there is also a template | ||
called 'painting'. | ||
in: | ||
""" | ||
import grok | ||
from grokcore.view.tests import grok | ||
import grokcore.view | ||
|
||
|
||
class Mammoth(grok.Model): | ||
pass | ||
|
||
|
||
class Painting(grok.View): | ||
grok.template('cavepainting') | ||
grokcore.view.template('cavepainting') | ||
|
||
|
||
cavepainting = grokcore.view.PageTemplate("GROK CAVEPAINT MAMMOTH!") | ||
|
||
cavepainting = grok.PageTemplate("GROK CAVEPAINT MAMMOTH!") | ||
painting = grok.PageTemplate("GROK PAINT MAMMOTH!") | ||
painting = grokcore.view.PageTemplate("GROK PAINT MAMMOTH!") |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/grok/tests/view/namemultiple.py → .../grokcore/view/tests/view/namemultiple.py
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
2 changes: 1 addition & 1 deletion
2
src/grok/tests/view/namemultiple_fixture.py → ...e/view/tests/view/namemultiple_fixture.py
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
2 changes: 1 addition & 1 deletion
2
src/grok/tests/view/nomodulename.py → .../grokcore/view/tests/view/nomodulename.py
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
3 changes: 2 additions & 1 deletion
3
src/grok/tests/view/nomodulename_fixture.py → ...e/view/tests/view/nomodulename_fixture.py
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
""" | ||
This should fail: | ||
""" | ||
import grok | ||
from grokcore.view.tests import grok | ||
|
||
grok.name('viewname') |
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
Oops, something went wrong.