Browse Source

PYADPT-116: add tests

PYADPT-116
heck 4 months ago
parent
commit
50a09206cd
1 changed files with 21 additions and 0 deletions
  1. +21
    -0
      tests/test_blob.py

+ 21
- 0
tests/test_blob.py View File

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# This file is under GNU Affero General Public License 3.0
# see LICENSE.txt
"""Blob unit tests."""
import pytest
from . import constants
from . import model
def test_blob_data_constructor(pEp, model):
bdata = bytes('this is test data', 'utf-8')
b = pEp.Blob(bdata)
assert(b.data == bdata)
def test_blob_data_property(pEp, model):
b = pEp.Blob(b'dummy')
bdata = bytes('this is test data', 'utf-8')
b.data = bdata
assert(b.data == bdata)

Loading…
Cancel
Save