Renamed a field in a test case that was preventing the tests from

running in Oracle.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ian Kelly 2008-07-02 16:59:17 +00:00
parent 56e1cdc8bc
commit f7903f7479
1 changed files with 5 additions and 5 deletions

View File

@ -15,10 +15,10 @@ class Device(models.Model):
class Port(models.Model):
device = models.ForeignKey('Device')
number = models.CharField(max_length=10)
port_number = models.CharField(max_length=10)
def __unicode__(self):
return u"%s/%s" % (self.device.name, self.number)
return u"%s/%s" % (self.device.name, self.port_number)
class Connection(models.Model):
start = models.ForeignKey(Port, related_name='connection_start',
@ -38,9 +38,9 @@ the "connections = ..." queries here should give the same results.
>>> dev1=Device.objects.create(name="router", building=b)
>>> dev2=Device.objects.create(name="switch", building=b)
>>> dev3=Device.objects.create(name="server", building=b)
>>> port1=Port.objects.create(number='4',device=dev1)
>>> port2=Port.objects.create(number='7',device=dev2)
>>> port3=Port.objects.create(number='1',device=dev3)
>>> port1=Port.objects.create(port_number='4',device=dev1)
>>> port2=Port.objects.create(port_number='7',device=dev2)
>>> port3=Port.objects.create(port_number='1',device=dev3)
>>> c1=Connection.objects.create(start=port1, end=port2)
>>> c2=Connection.objects.create(start=port2, end=port3)