Ejemplo n.º 1
0
    def test_InsertQuery(self):
        keys = Keys()
        entity = keys.new()

        expected = OrderedDict([('name', None), ('key', None)])
        data = keys._generate_query_data(entity)
        self.assertEqual(expected, data)

        expected = 'INSERT INTO keys(name,key) VALUES (?,?)'
        self.assertEqual(keys._generate_insert_query(data), expected)