diff --git a/neuropy/neuropy/templates/neuropy/about.html b/neuropy/neuropy/templates/neuropy/about.html index 3d3a33e..fa366e3 100644 --- a/neuropy/neuropy/templates/neuropy/about.html +++ b/neuropy/neuropy/templates/neuropy/about.html @@ -12,7 +12,7 @@
A personalized priority app to support a Cognitive Behavioral Therapy (CBT) approach to efficiently organize your day according to a struggle/disorder that is effectively treated by CBT. CBT is a goal-oriented pyschotherapy treatment, taking a hands-on approach to problem solving. Goal of CBT is to change the patterns of thinking or behavior that are behind a person's difficulties, modifying their feelings and therefore their thinking and behavior overtime.
-Neuropy Considers what the habit/disorder the user wants to treat with CBT, along with medication, it's half-life and peak periods. Also works around black-out periods on user's schedule by syncing with Google Calender, personal preference or most productive period of the day for user, and finally considers time commitments for each activity. Each "TO-DO" will be ranked considering these aspects and will be worked into periods of the day.
+Neuropy Considers what the habit/disorder the user wants to treat with CBT, along with medication, its efficacy, and peak periods. Also works around black-out periods on user's schedule by syncing with Google Calender, personal preference or most productive period of the day for user, and finally considers time commitments for each activity. Each "TO-DO" will be ranked considering these aspects and will be worked into periods of the day.
Join Today! @@ -40,7 +40,7 @@
Duration: 3
' in html) self.assertTrue('Description: Then Buy 7/11
' in html) + def test_todo_ease_level_is_correct(self): + """Test todo ease level is correct.""" + profile, todos = self.generate_todos() + todos = create_event_list("CONCERTA", profile) + self.assertTrue(len(todos) == 2) + + def test_todo_is_in_order(self): + """Test todo is arranged in right order.""" + profile, todo_lst = self.generate_todos() + todos = create_event_list("CONCERTA", profile) + self.assertTrue(todos[0]['title'] == todo_lst[1].title) + self.assertTrue(todos[1]['title'] == todo_lst[0].title) + + def test_todos_are_correct_ease_level(self): + """Test todo is assigned to correct ease levels.""" + profile, todo_lst = self.generate_todos() + todos = create_event_list("CONCERTA", profile) + self.assertTrue(todos[0]['ease'] == 'hard') + self.assertTrue(todos[1]['ease'] == 'medium') + + def test_todo_created_on_profile_on_wrong_date(self): + """Test todo is created for current date.""" + user = self.users[5] + todo1 = self.todos[0] + todo2 = self.todos[2] + todo1.owner, todo2.owner = user.profile, user.profile + + todo1.date = datetime.date(1, 2, 3) + todo2.date = datetime.date(1, 2, 3) + + todo1.ease = 1 + todo2.ease = 2 + + todo1.priority = 2 + todo2.priority = 3 + + todo1.duration = 1 + todo2.duration = 2 + + user.save() + todo1.save() + todo2.save() + + events = create_event_list('CONCERTA', user.profile) + self.assertFalse(events) + + def test_todo_duration(self): + """Test todo duration is equal to diff between end and start time of todo.""" + profile, todo_lst = self.generate_todos() + todos = create_event_list("CONCERTA", profile) + diff_todos_1 = todos[1]['end'] - todos[1]['start'] + self.assertTrue(datetime.timedelta(hours=todo_lst[0].duration) == diff_todos_1) + + def test_logged_out_todo_fails(self): """Test that a logged out user cannot create a todo.""" response = self.client.get(reverse_lazy('add_todo'))