improve testing infrastructure

Summary

writing tests for gitmate is hard and it shouldn't be :/

I was working on this comment deletion after code analysis. !379 (closed) And most of the time was spent in the tests and mocking. We should have better TestBase that can handle this stuff. It is pretty good currenty, but i think we can improve on them.

  • A sad GitMate developer

(I've also talked to a professsional software tester and he'll come around and see if we can derive a testing plan for integration tests. No action needed on that.)

Proposal

@nkprince007 @meetmangukiya you're writing most of the tests, please propose something too.

I'm imagining some decorator that allows us to mock a whole lot of igitt shit really fast.

@mock_repo(issues=[MockedObject(number=5, title='test', body=lambda x: 'test')])

sth like that?

@meetmangukiya anything else that's bad about tests and should be improved?

/cc @gitmate/open-source