split tests into multiple files, and fixed tests to work with refactor

This commit is contained in:
Micah Lee 2014-08-26 18:38:46 -07:00
parent 54a37ee28e
commit a32ca2f7a9
5 changed files with 103 additions and 83 deletions

View file

@ -0,0 +1,17 @@
from onionshare import web
from nose import with_setup
def test_generate_slug_length():
"generates a 26-character slug"
assert len(web.slug) == 26
def test_generate_slug_characters():
"generates a base32-encoded slug"
def is_b32(string):
b32_alphabet = "01234556789abcdefghijklmnopqrstuvwxyz"
return all(char in b32_alphabet for char in string)
assert is_b32(web.slug)