Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for generating html chars #32

Merged
merged 1 commit into from
Sep 17, 2014

Conversation

kbidarkar
Copy link
Contributor

No description provided.

@kbidarkar
Copy link
Contributor Author

[kedar@localhost fauxfactory]$ python
Python 2.7.3 (default, Aug 9 2012, 17:23:57)
[GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from fauxfactory import FauxFactory
html = FauxFactory.generate_html()
html
u'mUDIz'
html = FauxFactory.generate_html()
html
u'JwrKa'

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.6%) when pulling 7748d32 on kbidarkar:add-html-support into aed1e97 on omaciel:master.


html_tag = random.choice(HTML_TAGS).lower()
output_string = u'<%s>%s</%s>' % (
html_tag, cls.generate_string("alpha", length), html_tag)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use format for string interpolation, not %.

@Ichimonji10
Copy link
Contributor

If the parameter length must be positive, please note that in the docstring.

@kbidarkar
Copy link
Contributor Author

ok, fixing as per comments.

@Ichimonji10
Copy link
Contributor

Great. Thank you.

@kbidarkar kbidarkar force-pushed the add-html-support branch 2 times, most recently from dc458e9 to d33be10 Compare September 17, 2014 17:03
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.6%) when pulling dc458e9 on kbidarkar:add-html-support into aed1e97 on omaciel:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) when pulling d33be10 on kbidarkar:add-html-support into aed1e97 on omaciel:master.

@@ -15,7 +15,7 @@

from collections import Iterable
from fauxfactory.constants import (
LOREM_IPSUM_TEXT,
LOREM_IPSUM_TEXT, HTML_TAGS,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor thing, but alphabetical ordering is preferred.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) when pulling ca59617 on kbidarkar:add-html-support into aed1e97 on omaciel:master.

Added test for generate_html function
@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) when pulling 3f9e56e on kbidarkar:add-html-support into aed1e97 on omaciel:master.

@Ichimonji10
Copy link
Contributor

ACK.

Please add a GitHub issue for adding more tests.

@omaciel
Copy link
Owner

omaciel commented Sep 17, 2014

ACK and thanks for the test too @kbidarkar :)

omaciel added a commit that referenced this pull request Sep 17, 2014
Added support for generating html chars
@omaciel omaciel merged commit 86c9e00 into omaciel:master Sep 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants