def test_add_user(self):
        user = xivo_ws.User()
        user.firstname = u'test_ws_add_user'
        common.delete_with_firstname_lastname('users', user.firstname, '')
        self._xivo_ws.users.add(user)

        self.assertEqual(common.nb_with_firstname_lastname('users', user.firstname, ''), 1)
    def test_delete_user(self):
        self._add_user(u'test_ws_delete_user', '')
        common.delete_with_firstname_lastname('users', u'test_ws_delete_user',
                                              '')

        self.assertEqual(
            common.nb_with_firstname_lastname('users', u'test_ws_delete_user',
                                              ''), 0)
    def test_add_user(self):
        user = xivo_ws.User()
        user.firstname = u'test_ws_add_user'
        common.delete_with_firstname_lastname('users', user.firstname, '')
        self._xivo_ws.users.add(user)

        self.assertEqual(
            common.nb_with_firstname_lastname('users', user.firstname, ''), 1)
    def test_delete_user(self):
        self._add_user(u'test_ws_delete_user', '')
        common.delete_with_firstname_lastname('users', u'test_ws_delete_user', '')

        self.assertEqual(common.nb_with_firstname_lastname('users', u'test_ws_delete_user', ''), 0)