Beispiel #1
0
 def test_import_incoming_expiry_date(self):
     config = SiteConfiguration.get_solo()
     config.sms_expiration_date = today
     config.save()
     logs.check_incoming_log()
     assert models.SmsInbound.objects.filter(
         time_received__lt=today).count() == 0
Beispiel #2
0
 def test_import_incoming_rolling(self):
     config = SiteConfiguration.get_solo()
     config.sms_expiration_date = None
     config.sms_rolling_expiration_days = 0
     config.save()
     logs.check_incoming_log()
     assert models.SmsInbound.objects.filter(time_received__lt=today).count() == 0
Beispiel #3
0
 def test_cleanup_expiry_date(self):
     config = SiteConfiguration.get_solo()
     config.sms_expiration_date = None
     config.save()
     logs.check_incoming_log()
     logs.check_outgoing_log()
     num_sms = models.SmsInbound.objects.count() + models.SmsOutbound.objects.count()
     logs.cleanup_expired_sms()
     assert num_sms > 0
     assert models.SmsInbound.objects.count() + models.SmsOutbound.objects.count() == num_sms
     config = SiteConfiguration.get_solo()
     config.sms_expiration_date = today + timedelta(days=1)
     config.save()
     logs.cleanup_expired_sms()
     assert models.SmsInbound.objects.count() + models.SmsOutbound.objects.count() == 0
Beispiel #4
0
def check_incoming_log():
    """Update incoming log."""
    from apostello.logs import check_incoming_log
    check_incoming_log()
Beispiel #5
0
def check_incoming_log():
    """Update incoming log."""
    from apostello.logs import check_incoming_log
    check_incoming_log()
 def handle(self, *args, **options):
     check_incoming_log(fetch_all=True)
Beispiel #7
0
def check_incoming_log(page_id=0, fetch_all=False):
    """Update incoming log."""
    from apostello.logs import check_incoming_log
    check_incoming_log(page_id=page_id, fetch_all=fetch_all)
Beispiel #8
0
 def test_all_incoming(self):
     logs.check_incoming_log()
 def handle(self, *args, **options):
     """Handle the command."""
     check_incoming_log()
Beispiel #10
0
 def test_incoming_consistent(self):
     logs.check_incoming_log(fetch_all=False)
Beispiel #11
0
 def test_all_incoming(self):
     logs.check_incoming_log(fetch_all=True)
Beispiel #12
0
def check_incoming_log(page_id=0, fetch_all=False):
    """Update incoming log."""
    from apostello.logs import check_incoming_log
    check_incoming_log(page_id=page_id, fetch_all=fetch_all)
Beispiel #13
0
 def test_all_incoming(self):
     logs.check_incoming_log()
 def handle(self, *args, **options):
     """Handle the command."""
     check_incoming_log(fetch_all=True)
Beispiel #15
0
 def test_incoming_consistent(self):
     logs.check_incoming_log(fetch_all=False)
Beispiel #16
0
 def test_all_incoming(self):
     logs.check_incoming_log(fetch_all=True)