1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
# Copyright 2014 Canonical
4
# This program is free software: you can redistribute it and/or modify it
5
# under the terms of the GNU Lesser General Public License version 3, as
6
# published by the Free Software Foundation.
8
from __future__ import absolute_import
10
from testtools.matchers import Equals, NotEquals
11
from autopilot.matchers import Eventually
13
from webapp_container.tests import WebappContainerTestCaseWithLocalContentBase
16
class WebappContainerAppLaunchTestCase(
17
WebappContainerTestCaseWithLocalContentBase):
19
def test_container_does_not_load_with_no_webapp_name_and_url(self):
21
self.launch_webcontainer_app(args)
22
self.assertThat(self.get_webcontainer_proxy(), Equals(None))
24
def test_loads_with_url(self):
25
args = ['--enable-addressbar']
26
self.launch_webcontainer_app_with_local_http_server(args)
27
self.assertThat(lambda: self.get_webcontainer_window().url, Eventually(Equals(self.url)))