def test_get_records_created_in_date_range_requires_query_table(self): r = RESTQuery() with pytest.raises(AssertionError) as e: r.get_records_created_in_date_range("1970-01-01 00:01:00", "2012-12-12 10:10:45") assert "Query table must already be specified in this test case, but is not." in str( e)
def test_get_records_created_in_date_range_invalid_format(self): r = RESTQuery() r.query_table_is("ticket") with pytest.raises(AssertionError) as e: r.get_records_created_in_date_range("1970-01-01", "2012-12-12") assert "Input date arguments were not provided in the correct format. Verify that they are in the format YYYY-MM-DD hh:mm:ss." in str( e) with pytest.raises(AssertionError) as e: r.get_records_created_in_date_range("Michael Rules", "2012-12-12") assert "Input date arguments were not provided in the correct format. Verify that they are in the format YYYY-MM-DD hh:mm:ss." in str( e)