source: products/geolocation/branches/crchemist-geo_refactoring/tests/commonTestingStuff.py @ 1591

Last change on this file since 1591 was 1, checked in by myroslav, 19 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 1.4 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 geo.interfaces import IPoint
7from Products.geolocation.interfaces.geolocation import IPointView
8from Products.geolocation.interfaces.geomap import IGEOMap, IGEOMapView
9from Products.geolocation.adapters.geolocation import Point
10from Products.geolocation.adapters.geomap import GEOMap
11from Products.geolocation.browser.location import PointView
12from Products.geolocation.browser.map import GEOMapView
13
14from Products.PloneTestCase import PloneTestCase
15
16PRODUCTS=('geolocation',)
17
18map(PloneTestCase.installProduct, PRODUCTS)
19PloneTestCase.setupPloneSite(products=PRODUCTS)
20
21PRODUCT = 'geolocation'
22
23def maps_login(self, role):
24    """  Utility method for login under required role """
25    from Testing.ZopeTestCase.PortalTestCase import user_name, user_password
26    if role == 'manager':
27        self.loginAsPortalOwner()
28    elif role == 'member':
29        self.login(user_name)
30    elif role == 'another_member':
31        self.login('another_member')
32    elif role == 'anonym':
33        self.logout()
34
35# Installation testing stuff
36PORTAL_TYPES = ['Document', 'News Item', 'Event', 'Link', 'Image']
37GEO_INDEX = 'geoLocation'
38LATITUDE = 2.3
39LONGITUDE = 3.2
40ALTITUDE = 2.1
41MAP_CENTER = (9,9)
42MAP_ZOOM = 6
43MAP_TYPE = 'hybrid'
Note: See TracBrowser for help on using the repository browser.