Iacopo Spaletti @yakky http://nephila.co.uk/talk/testing-apps.html#/
djangocms-helper
http://djangocms-helper.readthedocs.org/
like django-admin.py
helper file - cms_helper.py in root of project
HELPER_SETTINGS = {
INSTALLED_APPS = [
]
...
}
How does it work
Does
Can run any command - by default it runs the tests
Writing tests
request = get_request(page=, lang=, user=, path=, use_middlewares=)
request.COOKIES
request.session
request.current_page
request.user
# etc
apphooks
app_page = api.create_page('page', 'project.html', ... apphook='MyApp')
app_page.publish('en')
self.reload_urlconf() # <-- THIS
user logins
with self.login_user_context(self.user):
self.client.get()
creating data
class MyTestCase(BaseTestCase):
_pages_data = (
{'', ... },
)
data - create CMS pages - parent, apphook
data - create users - admin, normal etc
other projects that use it