Beispiel #1
0
def reset_relationship(r):
    Connection.objects.filter(
        relationship_name=get_relationship(r).name).delete()
def reset_relationship(r):
    Connection.objects.filter(relationship_name=get_relationship(r).name).delete()
def test_get_relationship():
    r = define_relationship('rel', User, User)
    assert r is get_relationship('rel')
    assert r is get_relationship(r)
    assert_raises(Relationship.DoesNotExist, get_relationship, 'invalid')
Beispiel #4
0
def test_get_relationship():
    r = define_relationship('rel', User, User)
    assert r is get_relationship('rel')
    assert r is get_relationship(r)
    assert_raises(Relationship.DoesNotExist, get_relationship, 'invalid')