1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-07 21:58:41 +02:00

Add --watch for osc prjresults --xml

Like: osc results --watch
This commit is contained in:
2018-11-05 22:57:14 +01:00
parent a5e967efb3
commit 5e03ffcec9
3 changed files with 26 additions and 3 deletions

View File

@@ -33,6 +33,12 @@ class TestResults(OscTestCase):
out = self._run_osc('prjresults', '--xml', 'testproject')
self.assertEqualMultiline(out, self._get_fixture('result.xml')+'\n')
@GET('http://localhost/build/testproject/_result', file='result-dirty.xml')
@GET('http://localhost/build/testproject/_result?oldstate=c57e2ee592dbbf26ebf19cc4f1bc1e83', file='result.xml')
def testPrjresultsWatch(self):
out = self._run_osc('prjresults', '--watch', '--xml', 'testproject')
self.assertEqualMultiline(out, self._get_fixture('result-dirty.xml')+'\n'+self._get_fixture('result.xml')+'\n')
@GET('http://localhost/build/testproject/_result?package=python-MarkupSafe&multibuild=1&locallink=1', file='result.xml')
def testResults(self):
out = self._run_osc('results', '--xml', 'testproject', 'python-MarkupSafe')
@@ -44,3 +50,7 @@ class TestResults(OscTestCase):
out = self._run_osc('results', '--watch', '--xml', 'testproject', 'python-MarkupSafe')
self.assertEqualMultiline(out, self._get_fixture('result-dirty.xml')+self._get_fixture('result.xml'))
if __name__ == '__main__':
import unittest
unittest.main()