File: test_registry.py

package info (click to toggle)
python-ipmi 0.5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,132 kB
  • sloc: python: 12,645; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 795 bytes parent folder | download
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

import pyipmi.msgs
from pyipmi.msgs import create_message, create_response_message, create_response_by_name, create_request_by_name


def test_create_message():
    req = create_message(6, 1, None)
    assert type(req) is pyipmi.msgs.bmc.GetDeviceIdReq
    req = create_message(7, 1, None)
    assert type(req) is pyipmi.msgs.bmc.GetDeviceIdRsp


def test_create_response():
    req = pyipmi.msgs.bmc.GetDeviceIdReq()
    rsp = create_response_message(req)
    assert type(rsp) is pyipmi.msgs.bmc.GetDeviceIdRsp


def test_create_request_by_name():
    req = create_request_by_name('GetDeviceId')
    assert type(req) is pyipmi.msgs.bmc.GetDeviceIdReq


def test_create_response_by_name():
    rsp = create_response_by_name('GetDeviceId')
    assert type(rsp) is pyipmi.msgs.bmc.GetDeviceIdRsp