def test_empty_cl_is_not_exportable(self): data = { 'change_id': 'Ib58c7125d85d2fd71af711ea8bbd2dc927ed02cb', 'subject': 'fake subject', '_number': 638250, 'owner': {'email': '*****@*****.**'}, } gerrit_cl = GerritCL(data, MockGerritAPI()) # It's important that this does not throw! self.assertFalse(gerrit_cl.is_exportable())
def test_wpt_cl_is_exportable(self): data = { 'change_id': 'Ib58c7125d85d2fd71af711ea8bbd2dc927ed02cb', 'subject': 'fake subject', '_number': 638250, 'current_revision': '1', 'revisions': { '1': { 'commit_with_footers': 'fake subject', 'files': { RELATIVE_WEB_TESTS + 'external/wpt/foo/bar.html': '', } } }, 'owner': { 'email': '*****@*****.**' }, } gerrit_cl = GerritCL(data, MockGerritAPI()) self.assertTrue(gerrit_cl.is_exportable())
def test_no_wpt_cl_is_not_exportable(self): data = { 'change_id': 'Ib58c7125d85d2fd71af711ea8bbd2dc927ed02cb', 'subject': 'fake subject', '_number': 638250, 'current_revision': '1', 'revisions': { '1': { 'commit_with_footers': 'fake subject', 'files': { 'third_party/WebKit/LayoutTests/foo/bar.html': '', } } }, 'owner': { 'email': '*****@*****.**' }, } gerrit_cl = GerritCL(data, MockGerritAPI()) self.assertFalse(gerrit_cl.is_exportable())