from threading import Thread from django.test import TestCase # Create your tests here. if __name__ == '__main__': def forr(n, s): for i in range(n): print(s) for i in range(30): Thread( forr(10, i) ).start()