Did I find the right examples for you? yes no

All Samples(68)  |  Call(34)  |  Derive(0)  |  Import(34)

src/a/p/appscale-HEAD/AppServer/lib/django-1.5/tests/modeltests/one_to_one/tests.py   appscale(Download)
from django.test import TestCase
 
from .models import (Place, Restaurant, Waiter, ManualPrimaryKey, RelatedModel,
    MultiModel)
 
    def test_multiple_o2o(self):
        # One-to-one fields still work if you create your own primary key
        o1 = ManualPrimaryKey(primary_key="abc123", name="primary")
        o1.save()
        o2 = RelatedModel(link=o1, name="secondary")

src/a/p/appscale-HEAD/AppServer/lib/django-1.4/tests/modeltests/one_to_one/tests.py   appscale(Download)
from django.test import TestCase
 
from .models import (Place, Restaurant, Waiter, ManualPrimaryKey, RelatedModel,
    MultiModel)
 
    def test_multiple_o2o(self):
        # One-to-one fields still work if you create your own primary key
        o1 = ManualPrimaryKey(primary_key="abc123", name="primary")
        o1.save()
        o2 = RelatedModel(link=o1, name="secondary")

src/a/p/appscale-HEAD/AppServer/lib/django-1.3/tests/modeltests/one_to_one/tests.py   appscale(Download)
from django.test import TestCase
from django.db import transaction, IntegrityError
from models import Place, Restaurant, Waiter, ManualPrimaryKey, RelatedModel, MultiModel
 
class OneToOneTests(TestCase):
    def test_multiple_o2o(self):
        # One-to-one fields still work if you create your own primary key
        o1 = ManualPrimaryKey(primary_key="abc123", name="primary")
        o1.save()
        o2 = RelatedModel(link=o1, name="secondary")

src/a/p/appscale-HEAD/AppServer/lib/django-1.2/tests/modeltests/one_to_one/tests.py   appscale(Download)
from django.test import TestCase
from django.db import transaction, IntegrityError
from models import Place, Restaurant, Waiter, ManualPrimaryKey, RelatedModel, MultiModel
 
class OneToOneTests(TestCase):
    def test_multiple_o2o(self):
        # One-to-one fields still work if you create your own primary key
        o1 = ManualPrimaryKey(primary_key="abc123", name="primary")
        o1.save()
        o2 = RelatedModel(link=o1, name="secondary")

src/g/o/google-app-engine-HEAD/lib/django-1.5/tests/modeltests/one_to_one/tests.py   google-app-engine(Download)
from django.test import TestCase
 
from .models import (Place, Restaurant, Waiter, ManualPrimaryKey, RelatedModel,
    MultiModel)
 
    def test_multiple_o2o(self):
        # One-to-one fields still work if you create your own primary key
        o1 = ManualPrimaryKey(primary_key="abc123", name="primary")
        o1.save()
        o2 = RelatedModel(link=o1, name="secondary")

src/g/o/google-app-engine-HEAD/lib/django-1.4/tests/modeltests/one_to_one/tests.py   google-app-engine(Download)
from django.test import TestCase
 
from .models import (Place, Restaurant, Waiter, ManualPrimaryKey, RelatedModel,
    MultiModel)
 
    def test_multiple_o2o(self):
        # One-to-one fields still work if you create your own primary key
        o1 = ManualPrimaryKey(primary_key="abc123", name="primary")
        o1.save()
        o2 = RelatedModel(link=o1, name="secondary")

src/g/o/google-app-engine-HEAD/lib/django-1.3/tests/modeltests/one_to_one/tests.py   google-app-engine(Download)
from django.test import TestCase
from django.db import transaction, IntegrityError
from models import Place, Restaurant, Waiter, ManualPrimaryKey, RelatedModel, MultiModel
 
class OneToOneTests(TestCase):
    def test_multiple_o2o(self):
        # One-to-one fields still work if you create your own primary key
        o1 = ManualPrimaryKey(primary_key="abc123", name="primary")
        o1.save()
        o2 = RelatedModel(link=o1, name="secondary")

src/g/o/google-app-engine-HEAD/lib/django-1.2/tests/modeltests/one_to_one/tests.py   google-app-engine(Download)
from django.test import TestCase
from django.db import transaction, IntegrityError
from models import Place, Restaurant, Waiter, ManualPrimaryKey, RelatedModel, MultiModel
 
class OneToOneTests(TestCase):
    def test_multiple_o2o(self):
        # One-to-one fields still work if you create your own primary key
        o1 = ManualPrimaryKey(primary_key="abc123", name="primary")
        o1.save()
        o2 = RelatedModel(link=o1, name="secondary")

src/g/o/googleappengine-python-HEAD/lib/django-1.4/tests/modeltests/one_to_one/tests.py   googleappengine-python(Download)
from django.test import TestCase
 
from .models import (Place, Restaurant, Waiter, ManualPrimaryKey, RelatedModel,
    MultiModel)
 
    def test_multiple_o2o(self):
        # One-to-one fields still work if you create your own primary key
        o1 = ManualPrimaryKey(primary_key="abc123", name="primary")
        o1.save()
        o2 = RelatedModel(link=o1, name="secondary")

src/g/o/googleappengine-python-HEAD/lib/django-1.3/tests/modeltests/one_to_one/tests.py   googleappengine-python(Download)
from django.test import TestCase
from django.db import transaction, IntegrityError
from models import Place, Restaurant, Waiter, ManualPrimaryKey, RelatedModel, MultiModel
 
class OneToOneTests(TestCase):
    def test_multiple_o2o(self):
        # One-to-one fields still work if you create your own primary key
        o1 = ManualPrimaryKey(primary_key="abc123", name="primary")
        o1.save()
        o2 = RelatedModel(link=o1, name="secondary")

  1 | 2 | 3 | 4  Next