(self)
| 37 | self.assert_run_instances_call(args, result) |
| 38 | |
| 39 | def test_user_data(self): |
| 40 | data = '\u0039' |
| 41 | with temporary_file('r+') as tmp: |
| 42 | with compat_open(tmp.name, 'w') as f: |
| 43 | f.write(data) |
| 44 | f.flush() |
| 45 | args = ' --image-id foo --user-data file://%s' % f.name |
| 46 | result = { |
| 47 | 'ImageId': 'foo', |
| 48 | 'MaxCount': 1, |
| 49 | 'MinCount': 1, |
| 50 | # base64 encoded content of utf-8 encoding of data. |
| 51 | 'UserData': 'OQ==', |
| 52 | } |
| 53 | self.assert_run_instances_call(args, result) |
| 54 | |
| 55 | def test_count_range(self): |
| 56 | args = ' --image-id ami-foobar --count 5:10' |
nothing calls this directly
no test coverage detected