504 |
|
|
505 |
file_contents = '''<?xml version="1.0" encoding="UTF-8"?> |
file_contents = '''<?xml version="1.0" encoding="UTF-8"?> |
506 |
<!DOCTYPE session SYSTEM "thuban-0.8.dtd"> |
<!DOCTYPE session SYSTEM "thuban-0.8.dtd"> |
507 |
<session title="A Joined Table session"> |
<session xmlns="http://thuban.intevation.org/dtds/thuban-0.8.dtd" title="A Joined Table session"> |
508 |
<filetable filename="load_joinedtable.dbf" |
<fileshapesource filetype="shapefile" id="D137227612" |
509 |
title="Some Title" |
filename="../../Data/iceland/roads-line.shp"/> |
510 |
filetype="DBF" id="D141881756"/> |
<filetable filetype="DBF" filename="load_joinedtable.dbf" id="D136171140" |
511 |
<fileshapesource filename="../../Data/iceland/roads-line.shp" |
title="Some Title"/> |
512 |
filetype="shapefile" id="D142197204"/> |
<jointable leftcolumn="RDLNTYPE" right="D136171140" |
513 |
<jointable id="D142180284" |
title="Joined" rightcolumn="RDTYPE" id="D136169900" left="D137227612"/> |
514 |
title="Joined" |
<derivedshapesource table="D136169900" shapesource="D137227612" |
515 |
leftcolumn="RDLNTYPE" left="D142197204" |
id="D136170932"/> |
|
rightcolumn="RDTYPE" right="D141881756"/> |
|
|
<derivedshapesource id="D141915644" |
|
|
table="D142180284" shapesource="D142197204"/> |
|
516 |
<map title="Test Map"> |
<map title="Test Map"> |
517 |
<layer title="My Layer" |
<layer shapestore="D136170932" visible="true" stroke="#000000" |
518 |
shapestore="D141915644" visible="true" |
title="My Layer" stroke_width="1" fill="None"/> |
|
stroke="#000000" stroke_width="1" fill="None"/> |
|
519 |
</map> |
</map> |
520 |
</session>''' |
</session> |
521 |
|
''' |
522 |
|
|
523 |
def setUp(self): |
def setUp(self): |
524 |
"""Extend inherited method to create the dbffile for the join""" |
"""Extend inherited method to create the dbffile for the join""" |
542 |
# FIXME: The tests shouldn't assume a certain order of the tables |
# FIXME: The tests shouldn't assume a certain order of the tables |
543 |
self.assertEquals(tables[0].Title(), "Some Title") |
self.assertEquals(tables[0].Title(), "Some Title") |
544 |
self.assertEquals(tables[1].Title(), "Joined") |
self.assertEquals(tables[1].Title(), "Joined") |
545 |
|
self.check_format() |
546 |
|
|
547 |
|
|
548 |
class TestLoadError(LoadSessionTest): |
class TestLoadError(LoadSessionTest): |