~ubuntu-branches/ubuntu/saucy/cloud-init/saucy

« back to all changes in this revision

Viewing changes to tests/unittests/test_datasource/test_configdrive.py

  • Committer: Scott Moser
  • Date: 2013-04-11 16:53:06 UTC
  • mto: (245.2.5 raring)
  • mto: This revision was merged to the branch mainline in revision 250.
  • Revision ID: smoser@ubuntu.com-20130411165306-3tj29h0q9918xs67
Tags: upstream-0.7.2~bzr809
ImportĀ upstreamĀ versionĀ 0.7.2~bzr809

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
    def test_find_candidates(self):
260
260
        devs_with_answers = {}
261
261
 
262
 
        def my_devs_with(criteria):
263
 
            return devs_with_answers[criteria]
 
262
        def my_devs_with(*args, **kwargs):
 
263
            criteria = args[0] if len(args) else kwargs.pop('criteria', None)
 
264
            return devs_with_answers.get(criteria, [])
264
265
 
265
266
        def my_is_partition(dev):
266
267
            return dev[-1] in "0123456789" and not dev.startswith("sr")