def test_instance_is_stopped(self): instance_info = InstanceInfo( name="instance-name", state="STOPPED", image_release="16.04 LTS", mounts=dict(), ) self.assertThat(instance_info.is_stopped(), Equals(True))
def test_initialize(self): instance_info = InstanceInfo( name="instance-name", state="RUNNING", image_release="16.04 LTS" ) self.assertThat(instance_info.name, Equals("instance-name")) self.assertThat(instance_info.state, Equals("RUNNING")) self.assertThat(instance_info.image_release, Equals("16.04 LTS")) self.assertThat(instance_info.is_stopped(), Equals(False))
def test_initialize(self): instance_info = InstanceInfo(name="instance-name", state="RUNNING", image_release="16.04 LTS") self.assertThat(instance_info.name, Equals("instance-name")) self.assertThat(instance_info.state, Equals("RUNNING")) self.assertThat(instance_info.image_release, Equals("16.04 LTS")) self.assertThat(instance_info.is_stopped(), Equals(False))
def test_initialize(self): instance_info = InstanceInfo(name='instance-name', state='RUNNING', image_release='16.04 LTS') self.assertThat(instance_info.name, Equals('instance-name')) self.assertThat(instance_info.state, Equals('RUNNING')) self.assertThat(instance_info.image_release, Equals('16.04 LTS')) self.assertThat(instance_info.is_stopped(), Equals(False))
def test_instance_is_mounted(self): instance_info = InstanceInfo( name="instance-name", state="STOPPED", image_release="16.04 LTS", mounts=dict(project=dict()), ) self.assertThat(instance_info.is_mounted("project"), Equals(True)) self.assertThat(instance_info.is_mounted("not-project"), Equals(False))
def test_new_instance_from_unmarshalled_json(self): instance_info = InstanceInfo.from_json( instance_name=self.instance_name, json_info=self.json_string) self.assertThat(instance_info.name, Equals(self.instance_name)) self.assertThat(instance_info.state, Equals("RUNNING")) self.assertThat(instance_info.image_release, Equals("16.04 LTS"))
def test_new_instance_from_unmarshalled_json(self): instance_info = InstanceInfo.from_json( instance_name=self.instance_name, json_info=self.json_string ) self.assertThat(instance_info.name, Equals(self.instance_name)) self.assertThat(instance_info.state, Equals("RUNNING")) self.assertThat(instance_info.image_release, Equals("16.04 LTS"))
def test_instance_is_stopped(self): instance_info = InstanceInfo( name="instance-name", state="STOPPED", image_release="16.04 LTS" ) self.assertThat(instance_info.is_stopped(), Equals(True))
def test_instance_is_stopped(self): instance_info = InstanceInfo(name='instance-name', state='STOPPED', image_release='16.04 LTS') self.assertThat(instance_info.is_stopped(), Equals(True))