File: peer_fixture_base.py

package info (click to toggle)
odil 0.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 5,092 kB
  • sloc: cpp: 54,080; python: 3,896; xml: 182; makefile: 94
file content (18 lines) | stat: -rw-r--r-- 626 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
import unittest

import odil

class PeerFixtureBase(unittest.TestCase):
    def setUp(self, contexts):
        self.association = odil.Association()
        self.association.set_peer_host(os.environ["ODIL_PEER_HOST_NAME"])
        self.association.set_peer_port(int(os.environ["ODIL_PEER_PORT"]))
        self.association.update_parameters()\
            .set_calling_ae_title(os.environ["ODIL_OWN_AET"])\
            .set_called_ae_title(os.environ["ODIL_PEER_AET"]) \
            .set_presentation_contexts(contexts)
        self.association.associate()

    def tearDown(self):
        self.association.release()