示例#1
0
    def test_clear_old_emails(self):
        pe = PendingEmail('old')
        pe.new_email = '*****@*****.**'
        pe.verify_code = 'bibble-old'
        pe.save()

        self._make_old('email_changes', 'old')

        pe = PendingEmail('abc')
        pe.new_email = '*****@*****.**'
        pe.verify_code = 'bibble-new'
        pe.save()

        helpers.clear_old_emails()

        pe = PendingEmail('old')
        assert not pe.in_db

        pe = PendingEmail('abc')
        assert pe.in_db
示例#2
0
    def test_clear_old_emails(self):
        pe = PendingEmail('old')
        pe.new_email = '*****@*****.**'
        pe.verify_code = 'bibble-old'
        pe.save()

        self._make_old('email_changes', 'old')

        pe = PendingEmail('abc')
        pe.new_email = '*****@*****.**'
        pe.verify_code = 'bibble-new'
        pe.save()

        helpers.clear_old_emails()

        pe = PendingEmail('old')
        assert not pe.in_db

        pe = PendingEmail('abc')
        assert pe.in_db
示例#3
0
#!/usr/bin/env python3

import os
import sys

nemesis_root = os.path.dirname(os.path.abspath(__file__)) + "/../"
sys.path.insert(0, nemesis_root)

import config
import helpers

if __name__ == "__main__":
    config.configure_logging()
    helpers.clear_old_emails()
    helpers.clear_old_password_resets()
    helpers.clear_old_registrations()
    #helpers.send_emails()
示例#4
0
#!/usr/bin/env python

import os
import sys

nemesis_root = os.path.dirname(os.path.abspath(__file__)) + "/../"
sys.path.insert(0, nemesis_root)

import config
import helpers

if __name__ == "__main__":
    config.configure_logging()
    helpers.clear_old_emails()
    helpers.clear_old_password_resets()
    helpers.clear_old_registrations()
    #helpers.send_emails()