Ejemplo n.º 1
0
    def setUp(self):
        self.yesterday = datetime.today() - timedelta(1)
        self.a_while_ago = datetime.today() - timedelta(2)
        super(TestUserCount, self).setUp()
        for i in range(0, 3):
            u = AuthUserFactory()
            u.is_registered = True
            u.password = '******' + str(i)
            u.date_confirmed = self.yesterday
            u.save()
        # Make one of those 3 a depth user
        for i in range(LOG_THRESHOLD + 1):
            NodeLogFactory(action='file_added', user=u)
        u = AuthUserFactory()
        u.is_registered = True
        u.password = '******'
        u.date_confirmed = self.a_while_ago
        u.save()
        for i in range(LOG_THRESHOLD + 1):
            NodeLogFactory(action='file_added', user=u)
        for i in range(0, 2):
            u = AuthUserFactory()
            u.date_confirmed = None
            u.save()
        u = AuthUserFactory()
        u.date_disabled = self.yesterday
        u.save()
        u = AuthUserFactory()
        u.date_disabled = self.a_while_ago
        u.save()

        modify_user_dates_in_mongo(self.yesterday)
Ejemplo n.º 2
0
    def setUp(self):
        self.yesterday = datetime.today() - timedelta(1)
        self.a_while_ago = datetime.today() - timedelta(2)
        super(TestUserCount, self).setUp()
        for i in range(0, 3):
            u = AuthUserFactory()
            u.is_registered = True
            u.password = '******' + str(i)
            u.date_confirmed = self.yesterday
            u.save()
        u = AuthUserFactory()
        u.is_registered = True
        u.password = '******'
        u.date_confirmed = self.a_while_ago
        u.save()
        for i in range(0, 2):
            u = AuthUserFactory()
            u.date_confirmed = None
            u.save()
        u = AuthUserFactory()
        u.date_disabled = self.yesterday
        u.save()
        u = AuthUserFactory()
        u.date_disabled = self.a_while_ago
        u.save()

        modify_user_dates_in_mongo(self.yesterday)
Ejemplo n.º 3
0
    def setUp(self):
        self.yesterday = datetime.today() - timedelta(1)
        self.a_while_ago = datetime.today() - timedelta(2)
        super(TestUserCount, self).setUp()
        for i in range(0, 3):
            u = AuthUserFactory()
            u.is_registered = True
            u.password = '******' + str(i)
            u.date_confirmed = self.yesterday
            u.save()
        u = AuthUserFactory()
        u.is_registered = True
        u.password = '******'
        u.date_confirmed = self.a_while_ago
        u.save()
        for i in range(0, 2):
            u = AuthUserFactory()
            u.date_confirmed = None
            u.save()
        u = AuthUserFactory()
        u.date_disabled = self.yesterday
        u.save()
        u = AuthUserFactory()
        u.date_disabled = self.a_while_ago
        u.save()

        modify_user_dates_in_mongo(self.yesterday)