示例#1
0
 def create_busline(self):
     busline = Busline()
     busline.line_number = "001"
     busline.description = "description"
     busline.via = "via"
     busline.route_size = 2.5
     busline.fee = 2.0
     terminal = Terminal(description="terminal")
     terminal.save()
     busline.save()
     busline.terminals.add(terminal)
     return busline
    def create_busline(self):
        Busline.objects.all().delete()
        self.busline = Busline()
        self.busline.id = 1
        self.busline.line_number = "0.001"
        self.busline.description = "description"
        self.busline.via = "via"
        self.busline.route_size = 2.5
        self.busline.fee = 2.0
        self.busline.save()

        Terminal.objects.all().delete()
        terminal = Terminal(description="terminal")
        terminal.save()

        self.busline.terminals.add(terminal)
示例#3
0
 def test_busline_instance(self):
     busline = Busline()
     self.assertIsNotNone(busline)