def test_false_if_contains_key_with_different_value(self): expect({ 'spam': 1, 'eggs': 2 }).not_to(contain_key_with_value('eggs', 'the spinach imposition'))
def test_false_if_does_not_contain_key(self): expect({ 'spam': 1, 'eggs': 2 }).not_to(contain_key_with_value('beans', 1))
def test_adds_current_time_if_no_time_specified(self): event = "A sale at Penny's!" subscriber = Subscriber(event=event) EventBroker.publish(event=event) expect(subscriber.kwargs_received).to( contain_key_with_value("event_time", self.fake_now))
def test_launches_executable_with_stderr_to_stdout(self): self.create_fake_archive() BrowserStackTunnel() assert self.popen_spy.call_history, "popen was not called." args, kwargs = self.popen_spy.call_history[-1] expect(kwargs).to(contain_key_with_value("stderr", subprocess.STDOUT))
def test_includes_test_name(self): test_name = "watch this" EventBroker.publish(event=TestEvent.test_erred, test_name=test_name) expect(self.caught_dom_dump_kwargs()).to(contain_key_with_value("test_name", test_name))
def test_mime_type_is_html(self): EventBroker.publish(event=TestEvent.suite_erred) expect(self.caught_dom_dump_kwargs()).to(contain_key_with_value("artifact_mime_type", "text/html"))
def test_publishes_dump_on_test_failed(self): EventBroker.publish(event=TestEvent.test_failed) expect(self.caught_dom_dump_kwargs()).to(contain_key_with_value("artifact", self.fake_dump))
def test_includes_suite_name_on_test_failed(self): suite_name = "SuiteT" EventBroker.publish(event=TestEvent.test_failed, suite_name=suite_name) expect(self.caught_dom_dump_kwargs()).to(contain_key_with_value("suite_name", suite_name))
def test_named_after_suite(self): self.publish(TestEvent.suite_started) self.publish(TestEvent.suite_erred, exception=RuntimeError()) self.publish(TestEvent.suite_ended) expect(self.extract_dummy_test().attrib).to( contain_key_with_value("name", self.suite_name))
def test_status_is_error(self): self.publish(TestEvent.suite_started) self.publish(TestEvent.suite_erred, exception=RuntimeError()) self.publish(TestEvent.suite_ended) expect(self.extract_dummy_test().attrib).to( contain_key_with_value("status", "error"))
def test_artifact_type_is_http_transcript(self): self.trigger_transcript() expect(self.published).to( contain_key_with_value("artifact_type", "http_transcript"))
def test_artifact_mime_type_is_text_plain(self): self.trigger_transcript() expect(self.published).to( contain_key_with_value("artifact_mime_type", "text/plain"))
def test_true_if_contains_key_with_value(self): expect({"spam": 1, "eggs": 2}).to(contain_key_with_value("eggs", 2))
def test_false_if_does_not_contain_key(self): expect({"spam": 1, "eggs": 2}).not_to(contain_key_with_value("beans", 1))
def test_false_if_contains_key_with_different_value(self): expect({"spam": 1, "eggs": 2}).not_to(contain_key_with_value("eggs", "the spinach imposition"))