Exemplo n.º 1
0
 def test_merge(self, MR, session):
     mr = mock.Mock(_id='_id')
     MR.query.get.return_value = mr
     repo_tasks.merge(mr._id)
     mr.app.repo.merge.assert_called_once_with(mr)
     assert_equal(mr.status, 'merged')
     session.assert_called_once_with(mr)
     session.return_value.flush.assert_called_once_with(mr)
Exemplo n.º 2
0
 def test_merge(self, MR, session):
     mr = mock.Mock(_id='_id')
     MR.query.get.return_value = mr
     repo_tasks.merge(mr._id)
     mr.app.repo.merge.assert_called_once_with(mr)
     assert_equal(mr.status, 'merged')
     session.assert_called_once_with(mr)
     session.return_value.flush.assert_called_once_with(mr)
Exemplo n.º 3
0
 def test_merge(self, MR, session):
     mr = mock.Mock(_id='_id',
                    activity_name='merge req', activity_url='/fake/url', activity_extras={}, node_id=None)
     MR.query.get.return_value = mr
     repo_tasks.merge(mr._id)
     mr.app.repo.merge.assert_called_once_with(mr)
     assert_equal(mr.status, 'merged')
     session.assert_called_once_with(mr)
     session.return_value.flush.assert_called_once_with(mr)
Exemplo n.º 4
0
 def test_merge(self, MR, session):
     mr = mock.Mock(_id='_id',
                    activity_name='merge req', activity_url='/fake/url', activity_extras={}, node_id=None)
     MR.query.get.return_value = mr
     repo_tasks.merge(mr._id)
     mr.app.repo.merge.assert_called_once_with(mr)
     assert_equal(mr.status, 'merged')
     session.assert_called_once_with(mr)
     session.return_value.flush.assert_called_once_with(mr)