-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
29 additions
and
53 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,22 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
from Products.PloneTestCase import PloneTestCase as ptc | ||
from Products.Five.testbrowser import Browser | ||
from plone.app.testing.bbb import PloneTestCase | ||
from plone.app.testing import TEST_USER_NAME | ||
from plone.app.testing import TEST_USER_PASSWORD | ||
from plone.testing.z2 import Browser | ||
|
||
ptc.setupPloneSite() | ||
|
||
|
||
class IntegrationTestCase(ptc.PloneTestCase): | ||
""" base class for integration tests """ | ||
|
||
|
||
class FunctionalTestCase(ptc.FunctionalTestCase): | ||
class FunctionalTestCase(PloneTestCase): | ||
""" base class for functional tests """ | ||
|
||
def getBrowser(self, loggedIn=True): | ||
""" instantiate and return a testbrowser for convenience """ | ||
browser = Browser() | ||
browser = Browser(self.layer['app']) | ||
if loggedIn: | ||
user = ptc.default_user | ||
pwd = ptc.default_password | ||
browser.addHeader('Authorization', 'Basic %s:%s' % (user, pwd)) | ||
browser.addHeader('Authorization', 'Basic %s:%s' % ( | ||
TEST_USER_NAME, TEST_USER_PASSWORD)) | ||
return browser | ||
|
||
IntegrationTestCase = FunctionalTestCase |
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