/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/email/tests/testemail.py

  • Committer: Jelmer Vernooij
  • Date: 2018-07-07 19:27:38 UTC
  • mto: (7027.4.10 python3-blackbox)
  • mto: This revision was merged to the branch mainline in revision 7038.
  • Revision ID: jelmer@jelmer.uk-20180707192738-cbt5f28lbd3lx4td
Add some more bees; support writing both bytes and unicode strings in build_tree_contents.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    return TestLoader().loadTestsFromName(__name__)
31
31
 
32
32
 
33
 
sample_config=("[DEFAULT]\n"
34
 
               "post_commit_to=demo@example.com\n"
35
 
               "post_commit_sender=Sample <foo@example.com>\n"
36
 
               "revision_mail_headers=X-Cheese: to the rescue!\n")
37
 
 
38
 
unconfigured_config=("[DEFAULT]\n"
39
 
                     "email=Robert <foo@example.com>\n")
40
 
 
41
 
sender_configured_config=("[DEFAULT]\n"
42
 
                          "post_commit_sender=Sample <foo@example.com>\n")
43
 
 
44
 
to_configured_config=("[DEFAULT]\n"
45
 
                      "post_commit_to=Sample <foo@example.com>\n")
46
 
 
47
 
multiple_to_configured_config=("[DEFAULT]\n"
48
 
              "post_commit_sender=Sender <from@example.com>\n"
49
 
              "post_commit_to=Sample <foo@example.com>, Other <baz@bar.com>\n")
50
 
 
51
 
customized_mail_config=("[DEFAULT]\n"
52
 
                        "post_commit_to=demo@example.com\n"
53
 
                        "post_commit_sender=Sample <foo@example.com>\n"
54
 
                        "post_commit_subject=[commit] $message\n"
55
 
                        "post_commit_body='''$committer has committed "
56
 
                            "revision 1 at $url.\n\n'''\n")
57
 
 
58
 
push_config=("[DEFAULT]\n"
59
 
    "post_commit_to=demo@example.com\n"
60
 
    "post_commit_push_pull=True\n")
61
 
 
62
 
with_url_config=("[DEFAULT]\n"
63
 
                 "post_commit_url=http://some.fake/url/\n"
64
 
                 "post_commit_to=demo@example.com\n"
65
 
                 "post_commit_sender=Sample <foo@example.com>\n")
 
33
sample_config=(b"[DEFAULT]\n"
 
34
               b"post_commit_to=demo@example.com\n"
 
35
               b"post_commit_sender=Sample <foo@example.com>\n"
 
36
               b"revision_mail_headers=X-Cheese: to the rescue!\n")
 
37
 
 
38
unconfigured_config=(b"[DEFAULT]\n"
 
39
                     b"email=Robert <foo@example.com>\n")
 
40
 
 
41
sender_configured_config=(b"[DEFAULT]\n"
 
42
                          b"post_commit_sender=Sample <foo@example.com>\n")
 
43
 
 
44
to_configured_config=(b"[DEFAULT]\n"
 
45
                      b"post_commit_to=Sample <foo@example.com>\n")
 
46
 
 
47
multiple_to_configured_config=(b"[DEFAULT]\n"
 
48
              b"post_commit_sender=Sender <from@example.com>\n"
 
49
              b"post_commit_to=Sample <foo@example.com>, Other <baz@bar.com>\n")
 
50
 
 
51
customized_mail_config=(b"[DEFAULT]\n"
 
52
                        b"post_commit_to=demo@example.com\n"
 
53
                        b"post_commit_sender=Sample <foo@example.com>\n"
 
54
                        b"post_commit_subject=[commit] $message\n"
 
55
                        b"post_commit_body='''$committer has committed "
 
56
                            b"revision 1 at $url.\n\n'''\n")
 
57
 
 
58
push_config=(b"[DEFAULT]\n"
 
59
    b"post_commit_to=demo@example.com\n"
 
60
    b"post_commit_push_pull=True\n")
 
61
 
 
62
with_url_config=(b"[DEFAULT]\n"
 
63
                 b"post_commit_url=http://some.fake/url/\n"
 
64
                 b"post_commit_to=demo@example.com\n"
 
65
                 b"post_commit_sender=Sample <foo@example.com>\n")
66
66
 
67
67
# FIXME: this should not use a literal log, rather grab one from breezy.log
68
68
sample_log=('------------------------------------------------------------\n'