@pytest.mark.django_db
def test_order_package_parent_links():
 source = get_order_source_with_a_package()
 order = OrderCreator().create_order(source)
 lines = [prettify_order_line(line) for line in order.lines.all()]
 assert (lines == [u'#0 10 x PackageParent', u'#1   10 x PackageChild-0, child of #0', u'#2   20 x PackageChild-1, child of #0', u'#3   30 x PackageChild-2, child of #0', u'#4   40 x PackageChild-3, child of #0'])

@ pytest . mark . django_db def test_order_package_parent_links ( ) : source = get_order_source_with_a_package ( ) order = OrderCreator ( ) . create_order ( source ) lines = [ prettify_order_line ( line ) for line in order . lines . all ( ) ] assert ( lines == [ u'#0 10 x PackageParent' , u'#1   10 x PackageChild-0, child of #0' , u'#2   20 x PackageChild-1, child of #0' , u'#3   30 x PackageChild-2, child of #0' , u'#4   40 x PackageChild-3, child of #0' ] )
test ordercreator creates package parent links for child lines .