Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 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
Ejemplo n.º 3
0
 def test_last_insert_id(self):
     Alphabet.objects.create(a=7891)
     Alphabet.objects.update(a=LastInsertId('a') + 1)
     lid = LastInsertId.get()
     assert lid == 7891
Ejemplo n.º 4
0
 def test_last_insert_id(self):
     Alphabet.objects.create(a=7891)
     Alphabet.objects.update(a=LastInsertId('a') + 1)
     lid = LastInsertId.get()
     assert lid == 7891