def test_get_user_id(self):
        c = Controller(self.test_db)

        cl_id = c.create_client('user1')
        cl_data = c.get_client('id', cl_id)[0]

        self.assertEqual(cl_id, cl_data['id'])
    def test_create_client(self):
        c = Controller(self.test_db)

        cl_id = c.create_client('cl12345', name='Foo Bar', age='23')
        cl_data = c.get_client('id', cl_id)[0]

        self.assertEqual('Foo Bar', cl_data['name'])
        self.assertEqual('23', cl_data['age'])
    def test_update_client_events(self):
        c = Controller(self.test_db)

        cl_id = c.create_client('cl12345', name='Foo Bar', events=['ev12345'])
        c.update_client_events(cl_id, [])
        cl_data = c.get_client('id', cl_id)[0]

        self.assertFalse(cl_data['events'])

        self.assertEqual([], cl_data['events'])