File: test_c_definitions.py

package info (click to toggle)
azure-uamqp-python 1.6.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 35,564 kB
  • sloc: ansic: 184,383; cpp: 7,738; python: 7,731; cs: 5,767; sh: 983; xml: 298; makefile: 34
file content (50 lines) | stat: -rw-r--r-- 1,181 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#--------------------------------------------------------------------------

import os
import sys
import pytest

from uamqp import c_uamqp


def test_header():
    value = c_uamqp.cHeader()
    assert value is not None


def test_annotations():
    test_value = c_uamqp.bool_value(True)
    value = c_uamqp.create_annotations(test_value)

    # TODO
    #a_map = value.value
    #assert a_map.type == c_uamqp.AMQPType.DictValue

    new_value = value.clone()
    assert new_value is not value


def test_delivery_annotations():
    test_value = c_uamqp.bool_value(True)
    value = c_uamqp.create_delivery_annotations(test_value)

    # TODO
    #a_map = value.value
    #assert a_map.type == c_uamqp.AMQPType.DictValue


def test_message_annotations():
    test_value = c_uamqp.bool_value(True)
    value = c_uamqp.create_message_annotations(test_value)

    # TODO
    #a_map = value.value
    #assert a_map.type == c_uamqp.AMQPType.DictValue