Example #1
0
def test_add_note_to_order(order_with_lines):
    order = order_with_lines
    note = models.OrderNote(order=order, user=order.user)
    note_form = OrderNoteForm({'content': 'test_note'}, instance=note)
    note_form.is_valid()
    note_form.save()
    assert order.notes.first().content == 'test_note'
Example #2
0
def test_add_note_to_order(order_with_lines_and_stock):
    order = order_with_lines_and_stock
    note = models.OrderNote(order=order, user=order.user)
    note_form = OrderNoteForm({'content': 'test_note'}, instance=note)
    note_form.is_valid()
    note_form.save()
    assert order.notes.first().content == 'test_note'