File: EndpointContainerTest.py

package info (click to toggle)
nordugrid-arc 7.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 29,376 kB
  • sloc: cpp: 136,694; python: 12,452; perl: 12,313; php: 11,408; sh: 10,882; ansic: 3,305; makefile: 3,160; xml: 180; sql: 130; javascript: 53; sed: 30
file content (21 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import testutils, arc, unittest

class EndpointContainerTest(testutils.ARCClientTestCase):

    def test_the_class_exists(self):
        self.expect(arc.EndpointContainer).to_be_an_instance_of(type)
        
    def test_the_constructor(self):
        container = arc.EndpointContainer()
        self.expect(container).to_be_an_instance_of(arc.EndpointContainer)
        
    def test_adding_endpoints(self):
        container = arc.EndpointContainer()
        endpoint1 = arc.Endpoint()
        endpoint2 = arc.Endpoint()
        container.addEntity(endpoint1)
        container.addEntity(endpoint2)
        self.expect(container).to_have(2).endpoints()

if __name__ == '__main__':
    unittest.main()