All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
3 @pytest.mark.parametrize(
4 ("post_data", "message"),
6 # metadata_version errors.
9 "None is an invalid value for Metadata-Version. "
10 "Error: This field is required. "
12 "https://packaging.python.org/specifications/core-metadata",
15 {"metadata_version": "-1"},
16 "'-1' is an invalid value for Metadata-Version. "
17 "Error: Unknown Metadata Version "
19 "https://packaging.python.org/specifications/core-metadata",
23 {"metadata_version": "1.2"},
24 "'' is an invalid value for Name. "
25 "Error: This field is required. "
27 "https://packaging.python.org/specifications/core-metadata",
30 {"metadata_version": "1.2", "name": "foo-"},
31 "'foo-' is an invalid value for Name. "
32 "Error: Must start and end with a letter or numeral and "
33 "contain only ascii numeric and '.', '_' and '-'. "
35 "https://packaging.python.org/specifications/core-metadata",
39 {"metadata_version": "1.2", "name": "example"},
40 "'' is an invalid value for Version. "
41 "Error: This field is required. "
43 "https://packaging.python.org/specifications/core-metadata",
46 {"metadata_version": "1.2", "name": "example", "version": "dog"},
47 "'dog' is an invalid value for Version. "
48 "Error: Must start and end with a letter or numeral and "
49 "contain only ascii numeric and '.', '_' and '-'. "
51 "https://packaging.python.org/specifications/core-metadata",
55 def test_fails_invalid_post_data(
56 self, pyramid_config, db_request, post_data, message
58 pyramid_config.testing_securitypolicy(userid=1)
59 db_request.POST = MultiDict(post_data)
62 def foo(list_a, list_b):
64 User.query.filter(User.foo == "bar").filter( # Because foo.
65 db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
69 # Another comment about the filtering on is_quux goes here.
70 .filter(db.not_(User.is_pending.astext.cast(db.Boolean).is_(True))).order_by(
71 User.created_at.desc()