Пример #1
0
def sut():
    return Entity(entity=Widget)
Пример #2
0
def test_relationships(sut: Entity):
    relationships = sut.get_relationship_fields()
    assert len(relationships) == 3
    assert relationships[0].name == 'addresses'
    assert relationships[1].name == 'category'
    assert relationships[2].name == 'part'
Пример #3
0
def test_equality(sut: Entity):
    assert sut == Widget
    assert sut == sut
    assert sut == Entity(Widget)
    assert sut != Address
    assert sut != Entity(Address)
Пример #4
0
def category():
    return Entity(Category)
Пример #5
0
def part():
    return Entity(Part)
Пример #6
0
def address():
    return Entity(Address)
Пример #7
0
def widget():
    return Entity(Widget)
def sut():
    return Entity(Widget)