mirror of
				https://github.com/peeringdb/peeringdb.git
				synced 2024-05-11 05:55:09 +00:00 
			
		
		
		
	fix tests (#869)
This commit is contained in:
		@@ -13,7 +13,6 @@ from peeringdb_server.models import Organization
 | 
			
		||||
 | 
			
		||||
FIVE_MONTHS_AGO = datetime.now(tz=timezone.utc) - timedelta(days=150)
 | 
			
		||||
TWO_MONTHS_AGO = datetime.now(tz=timezone.utc) - timedelta(days=60)
 | 
			
		||||
NOW = datetime.now(tz=timezone.utc)
 | 
			
		||||
# max number of seconds we allow between running command and asserting date is
 | 
			
		||||
# the same
 | 
			
		||||
SECONDS_THRESHOLD = 120
 | 
			
		||||
@@ -22,6 +21,7 @@ SECONDS_THRESHOLD = 120
 | 
			
		||||
@pytest.mark.django_db
 | 
			
		||||
@override_settings(SPONSORSHIPS_EMAIL="localhost")
 | 
			
		||||
def test_send_email(outdated_sponsorship):
 | 
			
		||||
    NOW = datetime.now(tz=timezone.utc)
 | 
			
		||||
    sponsorship = Sponsorship.objects.all()[0]
 | 
			
		||||
    call_command("pdb_sponsorship_notify")
 | 
			
		||||
    sponsorship.refresh_from_db()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user