示例#1
0
    def test_create(self):
        expected_line = LineFeatures()
        expected_line.number = '1234'
        expected_line.protocolid = 1
        expected_line.protocol = 'sip'
        expected_line.name = 'name'
        expected_line.context = 'default'
        expected_line.provisioningid = 123456

        line_id = line_dao.create(expected_line)

        line = line_dao.get(line_id)

        self.assertEquals(line.number, expected_line.number)
        self.assertEquals(line.protocolid, expected_line.protocolid)
        self.assertEquals(line.protocol, expected_line.protocol)
        self.assertEquals(line.name, expected_line.name)
        self.assertEquals(line.context, expected_line.context)
        self.assertEquals(line.provisioningid, expected_line.provisioningid)
示例#2
0
 def test_get(self):
     line = self.add_line()
     result = line_dao.get(line.id)
     self.assertEquals(line, result)