source: products/geolocation/trunk/tests/commonTestingStuff.py

Last change on this file was 1, checked in by myroslav, 18 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1from zope.interface.verify import verifyClass
2from Testing.ZopeTestCase.PortalTestCase import user_name, user_password
3
4from Products.CMFCore.utils import getToolByName
5
6from Products.geolocation.interfaces.geolocation import IGEOLocated, IGEOLocatedView
7from Products.geolocation.interfaces.geomap import IGEOMap, IGEOMapView
8from Products.geolocation.adapters.geolocation import GEOLocated
9from Products.geolocation.adapters.geomap import GEOMap
10from Products.geolocation.browser.location import GEOLocatedView
11from Products.geolocation.browser.map import GEOMapView
12
13from Products.PloneTestCase import PloneTestCase
14
15PRODUCTS=('geolocation',)
16
17map(PloneTestCase.installProduct, PRODUCTS)
18PloneTestCase.setupPloneSite(products=PRODUCTS)
19
20PRODUCT = 'geolocation'
21
22def maps_login(self, role):
23    """  Utility method for login under required role """
24    from Testing.ZopeTestCase.PortalTestCase import user_name, user_password
25    if role == 'manager':
26        self.loginAsPortalOwner()
27    elif role == 'member':
28        self.login(user_name)
29    elif role == 'another_member':
30        self.login('another_member')
31    elif role == 'anonym':
32        self.logout()
33
34# Installation testing stuff
35PORTAL_TYPES = ['Document', 'News Item', 'Event', 'Link', 'Image']
36GEO_INDEX = 'geoLocation'
37LATITUDE = 2.3
38LONGITUDE = 3.2
39MAP_CENTER = (9,9)
40MAP_ZOOM = 6
41MAP_TYPE = 'hybrid'
Note: See TracBrowser for help on using the repository browser.