Exemplo n.º 1
0
 def test_should_exist_bad_vals(self):
     utils._check_fields(self.table,
                         "Id",
                         "existing",
                         "JUNK",
                         "GARBAGE",
                         should_exist=True)
Exemplo n.º 2
0
def test_rename_column():
    layer = resource_filename("tidegates.testing.rename_column", "rename_col.dbf")
    oldname = "existing"
    newname = "exists"

    #layer = utils.load_data(inputfile, "layer")

    utils.rename_column(layer, oldname, newname)
    utils._check_fields(layer, newname, should_exist=True)
    utils._check_fields(layer, oldname, should_exist=False)

    utils.rename_column(layer, newname, oldname)
    utils._check_fields(layer, newname, should_exist=False)
    utils._check_fields(layer, oldname, should_exist=True)
Exemplo n.º 3
0
def test_rename_column():
    layer = resource_filename("tidegates.testing.rename_column",
                              "rename_col.dbf")
    oldname = "existing"
    newname = "exists"

    #layer = utils.load_data(inputfile, "layer")

    utils.rename_column(layer, oldname, newname)
    utils._check_fields(layer, newname, should_exist=True)
    utils._check_fields(layer, oldname, should_exist=False)

    utils.rename_column(layer, newname, oldname)
    utils._check_fields(layer, newname, should_exist=False)
    utils._check_fields(layer, oldname, should_exist=True)
Exemplo n.º 4
0
 def test_should_not_exist_bad_vals(self):
     utils._check_fields(self.table,
                         "NEWFIELD",
                         "YANFIELD",
                         "existing",
                         should_exist=False)
Exemplo n.º 5
0
 def test_should_not_exist_multi_witharea(self):
     utils._check_fields(self.table,
                         "NEWFIELD",
                         "YANFIELD",
                         "SHAPE@AREA",
                         should_exist=False)
Exemplo n.º 6
0
 def test_should_not_exist_multi(self):
     utils._check_fields(self.table,
                         "NEWFIELD",
                         "YANFIELD",
                         should_exist=False)
Exemplo n.º 7
0
 def test_should_exist_multi_witharea(self):
     utils._check_fields(self.table,
                         "Id",
                         "existing",
                         "SHAPE@AREA",
                         should_exist=True)
Exemplo n.º 8
0
 def test_should_exist_multi(self):
     utils._check_fields(self.table, "Id", "existing", should_exist=True)
Exemplo n.º 9
0
 def test_should_exist_uni(self):
     utils._check_fields(self.table, "Id", should_exist=True)
Exemplo n.º 10
0
 def test_should_not_exist_multi_witharea(self):
     utils._check_fields(self.table, "NEWFIELD", "YANFIELD", "SHAPE@AREA", should_exist=False)
Exemplo n.º 11
0
 def test_should_not_exist_bad_vals(self):
     utils._check_fields(self.table, "NEWFIELD", "YANFIELD", "existing", should_exist=False)
Exemplo n.º 12
0
 def test_should_not_exist_multi(self):
     utils._check_fields(self.table, "NEWFIELD", "YANFIELD", should_exist=False)
Exemplo n.º 13
0
 def test_should_exist_bad_vals(self):
     utils._check_fields(self.table, "Id", "existing", "JUNK", "GARBAGE", should_exist=True)
Exemplo n.º 14
0
 def test_should_exist_multi_witharea(self):
     utils._check_fields(self.table, "Id", "existing", "SHAPE@AREA", should_exist=True)
Exemplo n.º 15
0
 def test_should_exist_multi(self):
     utils._check_fields(self.table, "Id", "existing", should_exist=True)
Exemplo n.º 16
0
 def test_should_exist_uni(self):
     utils._check_fields(self.table, "Id", should_exist=True)