Exemplo n.º 1
0
 def test_view_and_template(self):
     # ShowProfilePageView
     view_and_template(self, ShowProfilePageView, 'user_profile/user_profile_page.html',
                       'user_profile:user_profile_page', address_kwargs={'username': user_name})
     # EditProfilePageView
     view_and_template(self, EditProfilePageView, 'user_profile/edit_user_profile.html',
                       'user_profile:edit_profile', address_kwargs={'username': user_name})
Exemplo n.º 2
0
 def test_view_and_template(self):
     # general backlog
     view_and_template(self, BacklogListView, 'backlog/backlog_list.html', 'backlog:backlog',
                       address_kwargs={'project': self.project.name_short})
     # backlog for specific sprint
     view_and_template(self, BacklogListView, 'backlog/backlog_list.html', 'backlog:backlog',
                       address_kwargs={'project': self.project.name_short, 'sqn_s': 3})
Exemplo n.º 3
0
 def test_view_and_template(self):
     # this tests only the get requests
     # PasswordResetView
     view_and_template(self, PasswordResetView, pw_reset_template,
                       'password_reset')
     # PasswordResetSuccessView
     view_and_template(self, PasswordResetSuccessView,
                       pw_reset_done_template, 'password_reset_done')
Exemplo n.º 4
0
    def test_view_and_template(self):
        view_and_template(self, SignUpView, 'registration/sign_up.html',
                          'sign_up')

        # TODO uses post maybe this can be merged into the view_and_template?
        response = self.client.post(reverse('sign_up'), sign_up_dict)
        self.assertEqual(response.resolver_match.func.__name__,
                         SignUpView.as_view().__name__)
Exemplo n.º 5
0
 def test_view_and_template(self):
     view_and_template(self, HomeView, 'landing_page/dashboard.html',
                       'landing_page:home')
     # TODO TESTCASE see invite_users
     #      use view_and_template()
     # TODO which views?
     #      - ...
     pass
Exemplo n.º 6
0
    def test_login_view_and_template(self):
        view_and_template(self, LoginView, 'registration/login.html', 'login')

        response = self.client.post(reverse('login'), {
            'username': username,
            'password': password
        })
        self.assertEqual(response.resolver_match.func.__name__,
                         LoginView.as_view().__name__)
Exemplo n.º 7
0
    def test_view_and_template(self):
        # create comment
        comment = Comment(text="comment text", creator=self.user, issue=self.issue)
        comment.save()

        # edit comment-view
        view_and_template(self, IssueEditCommentView, 'comment/comment_edit.html', 'issue:edit_comment',
                          address_kwargs={'project': self.project.name_short, 'sqn_i': 1, 'pk_c': 1},
                          get_kwargs={'text': "comment text"})
Exemplo n.º 8
0
    def test_view_and_template(self):
        # invite_users
        view_and_template(self, InviteUserView,
                          'invite_users/invite_users.html',
                          'invite_users:invite_users')

        # successfully_invited
        view_and_template(self, SuccessView,
                          'invite_users/successfully_invited.html',
                          'invite_users:successfully_invited')
Exemplo n.º 9
0
    def test_view_and_template(self):
        # activity_chart
        view_and_template(self, TimelogGetActivityDataView, 'timelog/timelog_activity.html', 'timelog:activity')

        # last seven day chart
        view_and_template(self, TimelogD3View, 'timelog/timelog_d3.html', 'timelog:d3')
        # TODO TESTCASE see invite_users
        #      use view_and_template()
        # TODO which views?
        #      - ...
        pass
Exemplo n.º 10
0
    def test_view_and_template(self):
        # create
        view_and_template(self,
                          IssueCreateView,
                          create_template,
                          'issue:create',
                          address_kwargs={'project': self.project.name_short})

        # create issue for edit and detail tests
        issue = Issue(title="foo")
        issue.project = self.project
        issue.save()
        number = issue.number

        # edit
        view_and_template(self,
                          IssueEditView,
                          edit_template,
                          'issue:edit',
                          address_kwargs={
                              'project': self.project.name_short,
                              'sqn_i': number
                          })
        # detail
        view_and_template(self,
                          IssueDetailView,
                          detail_template,
                          'issue:detail',
                          address_kwargs={
                              'project': self.project.name_short,
                              'sqn_i': number
                          })
Exemplo n.º 11
0
    def test_view_and_template(self):
        # TODO TESTCASE api view and template
        #      use view_and_template()
        # TODO which views?
        #      - UserViewSet
        # view_and_template(self, UserViewSet, '', 'api:users')
        view_and_template(
            self,
            ProjectViewSet,
            None,
            'api:project-detail',
            address_kwargs={'name_short': self.project.name_short})
        #      - 'timelogs'
        #      - 'notifications'
        #      - 'issues'
        #      - 'project'
        #      - 'project_timelogs'
        #      - 'project_issues'
        #      - 'project_sprints'
        #      - 'project_issues_comments'
        #      - 'project_issues_timelogs'
        #      - ...

        pass
Exemplo n.º 12
0
    def test_view_and_template(self):
        # SprintboardView
        view_and_template(self,
                          SprintboardView,
                          'sprint/sprintboard.html',
                          'sprint:sprintboard',
                          address_kwargs={'project': self.project.name_short})
        # NewSprint doesn't render a template but redirects to BacklogListView
        view_and_template(self,
                          BacklogListView,
                          'backlog/backlog_list.html',
                          'sprint:newsprint',
                          address_kwargs={'project': self.project.name_short})
        # StartSprint doesn't render a template but redirects to BacklogListView
        # TODO this requires a post request
        # view_and_template(self, StartSprintView, 'backlog/backlog_list.html', 'sprint:startsprint',
        #                   address_kwargs={'project': self.project.name_short, 'sqn_s': self.sprint.seqnum})
        # StopSprintView
        view_and_template(self,
                          StopSprintView,
                          'sprint/sprint_finish.html',
                          'sprint:stopsprint',
                          address_kwargs={
                              'project': self.project.name_short,
                              'sqn_s': self.sprint.seqnum
                          })

        # SprintEditView
        view_and_template(self,
                          SprintEditView,
                          'sprint/sprint_edit.html',
                          'sprint:editsprint',
                          address_kwargs={
                              'project': self.project.name_short,
                              'sqn_s': self.sprint.seqnum
                          })
Exemplo n.º 13
0
    def test_view_and_template(self):
        # create
        view_and_template(self,
                          KanbanColumnCreateView,
                          'kanbancol/create_kanbancolumn.html',
                          'kanbancol:create',
                          address_kwargs={'project': self.project.name_short})
        # breadcrumb
        # TODO TESTCASE what is the correct reverse call for the breadcrumb?
        # view_and_template(self, KanbanColumnBreadcrumbView, 'kanbancol/breadcrumbs.html', 'kanbancol',
        #                   address_kwargs={'project': self.project.name_short, 'position': 0})

        # update
        view_and_template(self,
                          KanbanColumnUpdateView,
                          'kanbancol/update_kanbancolumn.html',
                          'kanbancol:update',
                          address_kwargs={
                              'project': self.project.name_short,
                              'position': 3
                          })

        # moveup
        # TODO TESTCASE what is wrong with this address_kwargs?
        # view_and_template(self, KanbanColumnUpView, 'project/project_edit.html', 'kanbancol:moveup',
        #                   address_kwargs={'project': self.project.name_short, 'position': 2})

        # movedown
        # TODO TESTCASE what is wrong with this address_kwargs?
        # view_and_template(self, KanbanColumnDownView, 'project/project_edit.html', 'kanbancol:movedown',
        #                   address_kwargs={'project': self.project.name_short, 'position': 2})

        # delete
        view_and_template(self,
                          KanbanColumnDeleteView,
                          'confirm_delete.html',
                          'kanbancol:delete',
                          address_kwargs={
                              'project': self.project.name_short,
                              'position': 3
                          })
Exemplo n.º 14
0
 def test_view_and_template(self):
     view_and_template(self,
                       ArchivedIssuesView,
                       'archive/archived_issues_view.html',
                       'archive:archive',
                       address_kwargs={'project': 'PRJ'})
Exemplo n.º 15
0
 def test_view_and_template(self):
     view_and_template(self, EditProfilePageView, edit_template, 'user_profile:edit_profile',
                       address_kwargs={"username": user_name})
Exemplo n.º 16
0
 def test_view_and_template(self):
     # TODO TESTCASE discussion-test view and templates
     # DiscussionsView
     view_and_template(self, DiscussionsView, 'discussions.html', 'discussion:list')
Exemplo n.º 17
0
 def test_tag_view_and_template(self):
     view_and_template(self, TagView, 'tag/tag_manage.html', 'tag:tag', address_kwargs={'project': p0_short})