def test_get_big_list_of_all_surveys(self):
        with HTTMock(self.mocks.surveys):
            survey_big_list = self.surveys.surveys()

        expect(survey_big_list).to(have_length(125))

        for survey in survey_big_list:
            expect(survey).to(have_keys('href', 'id', 'title'))
            expect(survey["href"]).to(end_with(survey['id']))
 def test_uses_json_extension_for_json_type(self):
     publish_artifact(artifact_mime_type="application/json")
     run_id, kind, suite, test, name = self.extract_key_parts()
     expect(name).to(end_with(".json"))
 def test_uses_bin_extension_for_unknown_type(self):
     publish_artifact(artifact_mime_type="mystery/spam")
     run_id, kind, suite, test, name = self.extract_key_parts()
     expect(name).to(end_with(".bin"))
 def test_uses_png_extension_for_png_type(self):
     publish_artifact(artifact_mime_type="image/png")
     run_id, kind, suite, test, name = self.extract_key_parts()
     expect(name).to(end_with(".png"))
 def test_uses_html_extension_for_html_type(self):
     publish_artifact(artifact_mime_type="text/html")
     run_id, kind, suite, test, name = self.extract_key_parts()
     expect(name).to(end_with(".html"))
def the_html_has_the_expected_title(katamari):
    expect(katamari.response.status_code).to(equal(HTTPStatus.OK))
    expect(katamari.data).to(start_with("<!doctype html>"))
    expect(katamari.soup.title.string).to(equal(TITLE))
    expect(katamari.data).to(end_with("</html>"))
    return
 def test_logger_formatter_ends_with_message(self):
     msg = "Hello!  My name is '); DROP TABLE Users; --"
     logger = logger_for_module("something")
     logger.error(msg)
     expect(self.last_message()).to(end_with(msg))
Exemple #8
0
 def test_uses_bin_extension_for_unknown_type(self):
     publish(artifact_mime_type="mystery/spam")
     expect(self.fake_file.filename).to(end_with(".bin"))
Exemple #9
0
 def test_uses_json_extension_for_json_type(self):
     publish(artifact_mime_type="application/json")
     expect(self.fake_file.filename).to(end_with(".json"))
Exemple #10
0
 def test_uses_html_extension_for_html_type(self):
     publish(artifact_mime_type="text/html")
     expect(self.fake_file.filename).to(end_with(".html"))
Exemple #11
0
 def test_uses_txt_extension_for_text_type(self):
     publish(artifact_mime_type="text/plain")
     expect(self.fake_file.filename).to(end_with(".txt"))
Exemple #12
0
 def test_uses_png_extension_for_png_type(self):
     publish(artifact_mime_type="image/png")
     expect(self.fake_file.filename).to(end_with(".png"))