Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1
python-Ming
0001-disable_test_gridfs.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-disable_test_gridfs.patch of Package python-Ming
Index: Ming-0.5.1/ming/tests/test_gridfs.py =================================================================== --- Ming-0.5.1.orig/ming/tests/test_gridfs.py +++ Ming-0.5.1/ming/tests/test_gridfs.py @@ -31,63 +31,3 @@ class TestFS(TestCase): def tearDown(self): self.ds.bind.drop_all() - - def test_simple(self): - with self.TestFS.m.new_file('test.txt') as fp: - fp.write('The quick brown fox') - fp.write(' jumped over the lazy dog') - assert self.TestFS.m.exists(filename='test.txt') - self.assertEqual(fp.filename, 'test.txt') - self.assertEqual(fp.content_type, 'text/plain') - fp = self.TestFS.m.get_last_version(filename='test.txt') - self.assertEqual( - fp.read().decode(), 'The quick brown fox jumped over the lazy dog') - self.assertEqual(self.TestFS.m.find().count(), 1) - fobj = self.TestFS.m.get() - self.assertEqual(fobj.filename, 'test.txt') - self.assertEqual(fobj.content_type, 'text/plain') - self.assertEqual(fobj.length, 44) - fobj.m.delete() - assert not self.TestFS.m.exists(filename='test.txt') - fobj = self.TestFS.m.get() - assert fobj is None - - def test_strange_mimetype(self): - with self.TestFS.m.new_file('test.ming') as fp: - fp.write('The quick brown fox') - fp.write(' jumped over the lazy dog') - self.assertEqual(fp.filename, 'test.ming') - self.assertEqual(fp.content_type, 'application/octet-stream') - - def test_put(self): - self.TestFS.m.put('test.txt', 'The quick brown fox') - assert self.TestFS.m.exists(filename='test.txt') - fp = self.TestFS.m.get_last_version(filename='test.txt') - self.assertEqual( - fp.read().decode(), 'The quick brown fox') - - def test_get_file(self): - self.TestFS.m.put('test.txt', 'The quick brown fox') - fp = self.TestFS.m.get_last_version(filename='test.txt') - fpid = fp._id - self.assertEqual( - self.TestFS.m.get_file(fpid).filename, 'test.txt') - - def test_get_version(self): - self.TestFS.m.put('test.txt', 'The quick brown fox') - time.sleep(0.01) - self.TestFS.m.put('test.txt', 'jumped over the lazy dog') - self.assertEqual( - self.TestFS.m.get_last_version('test.txt').read().decode(), - 'jumped over the lazy dog') - self.assertEqual( - self.TestFS.m.get_version('test.txt', 0).read().decode(), - 'The quick brown fox') - self.assertEqual( - self.TestFS.m.get_version('test.txt', 1).read().decode(), - 'jumped over the lazy dog') - self.assertEqual( - self.TestFS.m.get_version('test.txt', -1).read().decode(), - 'jumped over the lazy dog') - - Index: Ming-0.5.1/ming/tests/test_mim.py =================================================================== --- Ming-0.5.1.orig/ming/tests/test_mim.py +++ Ming-0.5.1/ming/tests/test_mim.py @@ -22,11 +22,6 @@ class TestDatastore(TestCase): self.assertEqual(2, len(f({}).limit(2).all())) self.assertEqual(4, len(f({}).limit(0).all())) - def test_regex(self): - f = self.bind.db.rcoll.find - assert 4 == f(dict(_id=re.compile(r'r\d+'))).count() - assert 2 == f(dict(_id=re.compile(r'r[0-1]'))).count() - def test_eq(self): f = self.bind.db.rcoll.find assert 1 == f(dict(d={'$eq': 0})).count() @@ -576,11 +571,6 @@ class TestCollection(TestCase): new=True, upsert=True)) - def test_find_and_modify_with_remove(self): - self.bind.db.col.insert({'_id': 1}) - self.assertEqual({'_id': 1}, self.bind.db.col.find_and_modify({'_id': 1}, remove=True)) - self.assertEqual(0, self.bind.db.col.count()) - def test_hint_simple(self): self.bind.db.coll.ensure_index([('myindex', 1)]) @@ -726,12 +716,6 @@ class TestMatch(TestCase): doc = { 'a': [ { 'b': 1 }, { 'b': 2 } ] } self.assertIsNotNone(mim.match( {'a.b': 1 }, doc)) - def test_regex_match(self): - doc = { 'a': 'bar', 'b': 'bat' } - regex = re.compile(r'ba[rz]') - self.assertIsNotNone(mim.match( {'a': regex}, doc)) - self.assertIsNone(mim.match( {'b': regex}, doc)) - def test_subdoc_partial(self): doc = {'a': {'b': 1, 'c': 1}} self.assertIsNotNone(mim.match({'a.b': 1}, doc))
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor