~rlane/nova/lp773690

« back to all changes in this revision

Viewing changes to nova/tests/test_instance_types.py

  • Committer: rlane at wikimedia
  • Date: 2011-04-29 22:30:40 UTC
  • mfrom: (382.1.655 nova)
  • Revision ID: rlane@wikimedia.org-20110429223040-i0x3ds9eqwrabyru
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
        """Ensures that instance type creation fails with invalid args"""
89
89
        self.assertRaises(exception.ApiError,
90
90
                          instance_types.destroy, "sfsfsdfdfs")
 
91
 
 
92
    def test_repeated_inst_types_should_raise_api_error(self):
 
93
        """Ensures that instance duplicates raises ApiError"""
 
94
        new_name = self.name + "dup"
 
95
        instance_types.create(new_name, 256, 1, 120, self.flavorid + 1)
 
96
        instance_types.destroy(new_name)
 
97
        self.assertRaises(
 
98
                exception.ApiError,
 
99
                instance_types.create, new_name, 256, 1, 120, self.flavorid)