Example #1
0
class TestLineClientP:
    def setUp(self):
        self.line_cfg = config['interface']['line']
        self.lineclient = LineClientP(self.line_cfg['account'],
                                      self.line_cfg['password'])

    def test_find_contact_by_id(self):
        contact = self.lineclient.find_contact_by_id(self.line_cfg['admin_id'])
        ok_(contact.id == self.line_cfg['admin_id'])

    @raises(ValueError)
    def test_find_contact_by_id_exception(self):
        self.lineclient.find_contact_by_id(self.line_cfg['admin_id'][:-2])
Example #2
0
 def setUp(self):
     self.line_cfg = config['interface']['line']
     self.lineclient = LineClientP(self.line_cfg['account'],
                                   self.line_cfg['password'])