Ejemplo n.º 1
0
    def test_logbook_get(self):
        expected = self.lb_names[0]
        actual = db_api.logbook_get('', self.lb_ids[0]).name

        self.assertEquals(expected, actual)

        self.assertRaises(exception.NotFound, db_api.logbook_get, '', 9001)
Ejemplo n.º 2
0
    def test_logbook_get(self):
        expected = self.lb_names[0]
        actual = db_api.logbook_get('', self.lb_ids[0]).name

        self.assertEquals(expected, actual)

        self.assertRaises(exception.NotFound, db_api.logbook_get, '', 9001)
Ejemplo n.º 3
0
    def test_logbook_create(self):
        id = 1
        while (self.lb_ids.count(id) > 0):
            id = id + 1
        lb_tmp = db_api.logbook_create('', u'logbook_{0}'.format(id), id)
        self.lb_ids.append(id)
        self.lb_names.append(u'logbook_{0}'.format(id))

        actual = db_api.logbook_get('', id)

        self.assertIsNotNone(actual)
Ejemplo n.º 4
0
    def test_logbook_create(self):
        id = 1
        while (self.lb_ids.count(id) > 0):
            id = id + 1
        lb_tmp = db_api.logbook_create('', u'logbook_{0}'.format(id), id)
        self.lb_ids.append(id)
        self.lb_names.append(u'logbook_{0}'.format(id))

        actual = db_api.logbook_get('', id)

        self.assertIsNotNone(actual)