def test_header_no_columns_works_correctly(self):
     row_values = ["Some name"]
     vertices = import_helpers.build_vertex_dict(row_values)
     vertex = vertices[2]
     self.assertEquals(vertex.header, '')
     self.assertEquals(vertex.name, 'Some name')
     self.assertEquals(vertex.year, '2100')
 def test_header_year_and_header_works_correctly(self):
     row_values = ["2050: Whee: Some name"]
     vertices = import_helpers.build_vertex_dict(row_values)
     vertex = vertices[2]
     self.assertEquals(vertex.header, 'Whee')
     self.assertEquals(vertex.name, 'Some name')
     self.assertEquals(vertex.year, '2050')
    def test_build_vertex_dict_creates_vertices(self):
        row_values = ["Some name", "Some other name"]

        import_helpers.build_vertex_dict(row_values)

        self.assertEquals(models.Vertex.objects.count(), 2)