Ejemplo 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))
Ejemplo 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))
Ejemplo 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')
Ejemplo 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')