예제 #1
0
def test_serialize_note():
    note = model.PostNote()
    note.polygon = [[0, 1], [1, 1], [1, 0], [0, 0]]
    note.text = "..."
    assert posts.serialize_note(note) == {
        "polygon": [[0, 1], [1, 1], [1, 0], [0, 0]],
        "text": "...",
    }
예제 #2
0
def test_serialize_note():
    note = db.PostNote()
    note.path = [[0, 1], [1, 1], [1, 0], [0, 0]]
    note.text = '...'
    assert posts.serialize_note(note) == {
        'polygon': [[0, 1], [1, 1], [1, 0], [0, 0]],
        'text': '...'
    }
예제 #3
0
def test_serialize_note():
    note = db.PostNote()
    note.polygon = [[0, 1], [1, 1], [1, 0], [0, 0]]
    note.text = '...'
    assert posts.serialize_note(note) == {
        'polygon': [[0, 1], [1, 1], [1, 0], [0, 0]],
        'text': '...'
    }