'With SQLite, foreign keys can be added with different syntaxes and
formatting.'

@skipUnless((connection.vendor == 'sqlite'), 'This    is    an    sqlite-specific    issue')
def test_get_relations_alt_format(self):

    create_table_statements = ['CREATE    TABLE    track(id,    art_id    INTEGER,    FOREIGN    KEY(art_id)    REFERENCES    {}(id));', 'CREATE    TABLE    track(id,    art_id    INTEGER,    FOREIGN    KEY    (art_id)    REFERENCES    {}(id));']
    for statement in create_table_statements:
        with connection.cursor() as cursor:
            cursor.fetchone = mock.Mock(return_value=[statement.format(Article._meta.db_table)])
            relations = connection.introspection.get_relations(cursor, 'mocked_table')
        self.assertEqual(relations, {'art_id': ('id', Article._meta.db_table)})
