jan: thuban/test test_save.py,1.37,1.38
cvs@intevation.de
cvs at intevation.de
Wed Jul 27 23:45:40 CEST 2005
Author: jan
Update of /thubanrepository/thuban/test
In directory doto:/tmp/cvs-serv6556
Modified Files:
test_save.py
Log Message:
(SaveSessionTest.testSingleLayer, SaveSessionTest.testLayerProjection,
SaveSessionTest.testClassifiedLayer, SaveSessionTest.test_joined_table,
SaveSessionTest.test_save_postgis): Removed attributes from layer
element to classification clnull element.
(test_save_postgis.NonConnectionStore._fetch_table_information): added
pretending to have a shape_type.
Index: test_save.py
===================================================================
RCS file: /thubanrepository/thuban/test/test_save.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- test_save.py 1 Jul 2005 20:49:04 -0000 1.37
+++ test_save.py 27 Jul 2005 21:45:38 -0000 1.38
@@ -34,7 +34,7 @@
from Thuban.Model.proj import Projection
from Thuban.Model.table import DBFTable
from Thuban.Model.transientdb import TransientJoinedTable
-from Thuban.Model.data import DerivedShapeStore
+from Thuban.Model.data import DerivedShapeStore, SHAPETYPE_ARC
from Thuban.Model.classification import ClassGroupSingleton, ClassGroupRange, \
ClassGroupProperties
@@ -156,8 +156,14 @@
<parameter value="datum=WGS84"/>
<parameter value="units=m"/>
</projection>
- <layer title="My Layer" shapestore="D1"
- fill="None" stroke="#000000" stroke_width="1" visible="%s"/>
+ <layer title="My Layer" shapestore="D1" visible="%s">
+ <classification>
+ <clnull label="">
+ <cldata fill="None" stroke="#000000"
+ stroke_width="1"/>
+ </clnull>
+ </classification>
+ </layer>
</map>
</session>'''
@@ -216,14 +222,19 @@
<parameter value="proj=utm"/>
<parameter value="ellps=clrk66"/>
</projection>
- <layer title="My Layer" shapestore="D1"
- fill="None" stroke="#000000" stroke_width="1" visible="true">
+ <layer title="My Layer" shapestore="D1" visible="true">
<projection name="Layer Projection">
<parameter value="proj=lcc"/>
<parameter value="ellps=clrk66"/>
<parameter value="lat_1=0"/>
<parameter value="lat_2=20"/>
</projection>
+ <classification>
+ <clnull label="">
+ <cldata fill="None" stroke="#000000"
+ stroke_width="1"/>
+ </clnull>
+ </classification>
</layer>
</map>
</session>'''
@@ -351,8 +362,7 @@
<parameter value="proj=utm"/>
<parameter value="ellps=clrk66"/>
</projection>
- <layer title="My Layer" shapestore="D1"
- fill="None" stroke="#000000" stroke_width="1" visible="true">
+ <layer title="My Layer" shapestore="D1" visible="true">
<classification field="AREA" field_type="double">
<clnull label="">
<cldata fill="None" stroke="#000000" stroke_width="1"/>
@@ -371,8 +381,7 @@
</clrange>
</classification>
</layer>
- <layer title="My Layer" shapestore="D1"
- fill="None" stroke="#000000" stroke_width="1" visible="true">
+ <layer title="My Layer" shapestore="D1" visible="true">
<classification field="POPYCOUN" field_type="string">
<clnull label="">
<cldata fill="None" stroke="#000000" stroke_width="1"/>
@@ -486,8 +495,14 @@
shapesource="D142197204"/>
<map title="Test Map">
<layer title="My Layer"
- shapestore="D141915644" visible="true"
- stroke="#000000" stroke_width="1" fill="None"/>
+ shapestore="D141915644" visible="true">
+ <classification>
+ <clnull label="">
+ <cldata fill="None" stroke="#000000"
+ stroke_width="1"/>
+ </clnull>
+ </classification>
+ </layer>
</map>
</session>'''
@@ -511,6 +526,8 @@
def _fetch_table_information(self):
# pretend that we've found a geometry column
self.geometry_column = "the_geom"
+ # pretend this is a ARC shape type.
+ self.shape_type = SHAPETYPE_ARC
def IDColumn(self):
"""Return an object with a name attribute with value 'gid'"""
class dummycol:
@@ -549,8 +566,14 @@
id_column="gid" geometry_column="the_geom"/>
<map title="Test Map">
<layer title="Roads to Nowhere"
- shapestore="roads" visible="true"
- stroke="#000000" stroke_width="1" fill="None"/>
+ shapestore="roads" visible="true">
+ <classification>
+ <clnull label="">
+ <cldata fill="None" stroke="#000000"
+ stroke_width="1"/>
+ </clnull>
+ </classification>
+ </layer>
</map>
</session>'''
self.compare_xml(written, expected)
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)