def test_last_insert_id_other_db_connection(self): Alphabet.objects.using('other').create(a=9191) Alphabet.objects.using('other').update(a=LastInsertId('a') + 9) lid = LastInsertId.get(using='other') assert lid == 9191
def test_last_insert_id_other_db_connection(self): Alphabet.objects.using('other').create(a=9191) Alphabet.objects.using('other').update(a=LastInsertId('a') + 9) lid = LastInsertId.get(using='other') assert lid == 9191
def test_last_insert_id(self): Alphabet.objects.create(a=7891) Alphabet.objects.update(a=LastInsertId('a') + 1) lid = LastInsertId.get() assert lid == 7891
def test_last_insert_id(self): Alphabet.objects.create(a=7891) Alphabet.objects.update(a=LastInsertId('a') + 1) lid = LastInsertId.get() assert lid == 7891