Permalink
Browse files

patch for GI-97

  • Loading branch information...
buzztroll committed May 4, 2012
1 parent 301ca50 commit b77f65cec415a215adb66fbb7a8ad2140a382996
Showing with 9 additions and 0 deletions.
  1. +2 −0 cumulus/authz/pynimbusauthz/db.py
  2. +7 −0 cumulus/authz/pynimbusauthz/tests/file_test.py
@@ -13,6 +13,7 @@ def make_test_database(db_str=":memory:"):
f.close()
commands = s.split(";")
conn = sqlite3.connect(db_str)
+ conn.text_factory = str
c = conn.cursor()
for e in commands:
c.execute(e)
@@ -38,6 +39,7 @@ def __init__(self, con_str=None, con=None):
url = urlparse.urlparse("http://" + rest)
if scheme == "sqlite" or scheme == '':
self.con = sqlite3.connect(url.path)
+ self.con.text_factory = str
elif scheme == "psycopg2":
import psycopg2
@@ -37,6 +37,13 @@ def test_basic_file(self):
b2 = file1.get_object_type()
self.assertEqual(pynimbusauthz.object_type_s3, b2, "Type wrong")
+ def test_international_file(self):
+ user1 = User(self.db)
+ name = os.environ['CUMULUS_WORD']
+ data = "/etc/group"
+ file1 = File.create_file(self.db, name, user1, data, pynimbusauthz.object_type_s3)
+ self.db.commit()
+
def test_file_children(self):
user1 = User(self.db)
name = "/file/name"

0 comments on commit b77f65c

Please sign in to comment.