Esempio n. 1
0
 def test_get_activity_level_without_report(self):
     """Test activity level helper."""
     user = UserFactory.create(groups=['Rep'])
     ok_(not get_activity_level(user))
Esempio n. 2
0
 def test_get_activity_level_without_report(self):
     """Test activity level helper."""
     user = UserFactory.create(groups=['Rep'])
     ok_(not get_activity_level(user))
Esempio n. 3
0
 def test_get_activity_level_high(self):
     """Test activity level helper."""
     report_date = timezone.now().date() - timedelta(weeks=9)
     user = UserFactory.create(groups=['Rep'])
     NGReportFactory.create(user=user, report_date=report_date)
     eq_(get_activity_level(user), 'inactive-high')
Esempio n. 4
0
 def test_get_activity_level_high(self):
     """Test activity level helper."""
     report_date = timezone.now().date() - timedelta(weeks=9)
     user = UserFactory.create(groups=['Rep'])
     NGReportFactory.create(user=user, report_date=report_date)
     eq_(get_activity_level(user), 'inactive-high')