def handle(self, *args, **options):
        users = User.objects.all()

        # For every user
        for user in users:
            # How many ruls?
            urls = set([URLS[random.randrange(0, len(URLS))] for i in range(random.randrange(0, len(URLS)))])
            for url in urls:
                create_token(url, user.id)
Exemple #2
0
 def setUp(self):
     # Manual fixtures
     urls = ["www.google.com", "github.com", "xlarrakoetxea.org"]
     user = User.objects.get(id=1)
     for i in urls:
         create_token(i, user.id, False)