Mercurial > public > mercurial-scm > hg
diff tests/test-bundle2.t @ 21605:f9dabfceb259
bundle2: introduce a ``addparam`` method on part
We make it easier to add new parameters after the part creation. As for the
``data`` attribute we make sure the part generation has not begun yet.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 22 May 2014 11:38:40 -0700 |
parents | c399bf961cb9 |
children | 0cfda08afd24 |
line wrap: on
line diff
--- a/tests/test-bundle2.t Thu May 22 11:21:26 2014 -0700 +++ b/tests/test-bundle2.t Thu May 22 11:38:40 2014 -0700 @@ -106,10 +106,11 @@ > bundler.newpart('test:empty') > bundler.newpart('test:song', data=ELEPHANTSSONG) > bundler.newpart('test:debugreply') - > bundler.newpart('test:math', - > [('pi', '3.14'), ('e', '2.72')], - > [('cooking', 'raw')], - > '42') + > mathpart = bundler.newpart('test:math') + > mathpart.addparam('pi', '3.14') + > mathpart.addparam('e', '2.72') + > mathpart.addparam('cooking', 'raw', mandatory=False) + > mathpart.data = '42' > if opts['unknown']: > bundler.newpart('test:UNKNOWN', data='some random content') > if opts['parts']: