Exemplo n.º 1
0
    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))
Exemplo n.º 2
0
    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))
Exemplo n.º 3
0
    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))
Exemplo n.º 4
0
    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))
Exemplo n.º 5
0
    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))
Exemplo n.º 6
0
    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))