Skip to content

Commit

Permalink
Merge #72 (#80)
Browse files Browse the repository at this point in the history
* Accept extra query parameters in milestones' listing

* Edit test
  • Loading branch information
yakky committed Apr 11, 2019
1 parent 337eba8 commit d57b72c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions taiga/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,11 +1247,11 @@ def import_milestone(self, name, estimated_start, estimated_finish,
estimated_finish, **attrs
)

def list_milestones(self):
def list_milestones(self, **queryparams):
"""
Get the list of :class:`Milestone` resources for the project.
"""
return Milestones(self.requester).list(project=self.id)
return Milestones(self.requester).list(project=self.id, **queryparams)

def add_point(self, name, value, **attrs):
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ def test_import_milestone(self, mock_import_milestone):
def test_list_milestones(self, mock_list_milestones):
rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
project = Project(rm, id=1)
project.list_milestones()
mock_list_milestones.assert_called_with(project=1)
project.list_milestones(subject='foo')
mock_list_milestones.assert_called_with(project=1, subject='foo')

@patch('taiga.models.Issues.create')
def test_add_issue(self, mock_new_issue):
Expand Down

0 comments on commit d57b72c

Please sign in to comment.