Ejemplo n.º 1
0
    def test_update_revision_description_no_op(self):
        c = commit(
            rev_id="D123",
            title="hi!",
            body="hello!\n\nDifferential Revision: http://phabricator.test/D123",
        )
        r = dict(fields=dict(title="hi!", summary="hello!\n\n"))
        t = []

        expected = []
        submit.update_revision_description(t, c, r)

        self.assertListEqual(t, expected)
Ejemplo n.º 2
0
    def test_update_revision_description(self):
        c = commit(
            rev_id="D123",
            title="hi!",
            body="hello!  µ-benchmarks are a thing.\n\n"
            "Differential Revision: http://phabricator.test/D123",
        )
        r = dict(fields=dict(title="", summary=""))
        t = []

        expected = [
            dict(type="title", value="hi!"),
            dict(type="summary", value="hello!  µ-benchmarks are a thing."),
        ]
        submit.update_revision_description(t, c, r)

        self.assertListEqual(t, expected)