def test_print_image(self): class FakeImage(): id = 1 name = 'fake_image' is_public = False protected = False status = 'active' size = '1024' min_ram = 512 min_disk = 10 properties = {'a': 'b', 'c': 'd'} created_at = '04.03.2013' owner = 'test' updated_at = '04.03.2013' deleted_at = '04.03.2013' gc = client.Client('1', 'http://is.invalid:8080') test_shell.print_image_formatted(gc, FakeImage())
def test_print_image_formatted(self): class FakeClient(): endpoint = 'http://no.where' class FakeImage(): id = 1 name = 'fake_image' is_public = False protected = False status = 'active' size = '1024' min_ram = 512 min_disk = 10 properties = {'a': 'b', 'c': 'd'} created_at = '04.03.2013' owner = 'test' updated_at = '04.03.2013' deleted_at = '04.03.2013' test_shell.print_image_formatted(FakeClient(), FakeImage())
def test_print_image_formatted(self): class FakeClient(): class FakeHTTPClient(): endpoint = 'http://is.invalid' http_client = FakeHTTPClient() class FakeImage(): id = 1 name = 'fake_image' is_public = False protected = False status = 'active' size = '1024' min_ram = 512 min_disk = 10 properties = {'a': 'b', 'c': 'd'} created_at = '04.03.2013' owner = 'test' updated_at = '04.03.2013' deleted_at = '04.03.2013' test_shell.print_image_formatted(FakeClient(), FakeImage())