Skip to content

Commit

Permalink
Use Zope master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-rt committed May 1, 2018
1 parent eee1a51 commit 5516515
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
13 changes: 7 additions & 6 deletions Products/GenericSetup/PluginIndexes/tests/test_exportimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
_DATE_XML = b"""\
<index name="foo_date" meta_type="DateIndex">
<property name="index_naive_time_as_local">True</property>
<property name="precision">1</property>
</index>
"""

Expand Down Expand Up @@ -228,7 +229,7 @@ def _no_clear(*a):
raise AssertionError("Don't clear me!")
index = FieldIndex('foo_field')
index.indexed_attrs = ['bar']
index.clear = _no_clear
index.clear = _no_clear
adapted = PluggableIndexNodeAdapter(index, environ)
adapted.node = parseString(_FIELD_XML).documentElement # no raise

Expand All @@ -244,7 +245,7 @@ def _no_clear(*a):
raise AssertionError("Don't clear me!")
index = KeywordIndex('foo_keyword')
index.indexed_attrs = ['bar']
index.clear = _no_clear
index.clear = _no_clear
adapted = PluggableIndexNodeAdapter(index, environ)
adapted.node = parseString(_KEYWORD_XML).documentElement # no raise

Expand Down Expand Up @@ -274,7 +275,7 @@ def _no_clear(*a):
raise AssertionError("Don't clear me!")
index = DateIndex('foo_date')
index._setPropValue('index_naive_time_as_local', True)
index.clear = _no_clear
index.clear = _no_clear
adapted = DateIndexNodeAdapter(index, environ)
adapted.node = parseString(_DATE_XML).documentElement # no raise

Expand All @@ -291,7 +292,7 @@ def _no_clear(*a):
index = DateRangeIndex('foo_daterange')
index._since_field = 'bar'
index._until_field = 'baz'
index.clear = _no_clear
index.clear = _no_clear
adapted = DateRangeIndexNodeAdapter(index, environ)
adapted.node = parseString(_DATERANGE_XML).documentElement # no raise

Expand All @@ -306,7 +307,7 @@ def test_FilteredSet(self):
def _no_clear(*a):
raise AssertionError("Don't clear me!")
index = PythonFilteredSet('bar', 'True')
index.clear = _no_clear
index.clear = _no_clear
adapted = FilteredSetNodeAdapter(index, environ)
adapted.node = parseString(_SET_XML).documentElement # no raise

Expand All @@ -324,7 +325,7 @@ def _no_clear(*a):
index.addFilteredSet('baz', 'PythonFilteredSet', 'False')
bar = index.filteredSets['bar']
baz = index.filteredSets['baz']
bar.clear = baz.clear = _no_clear
bar.clear = baz.clear = _no_clear
adapted = TopicIndexNodeAdapter(index, environ)
adapted.node = parseString(_SET_XML).documentElement # no raise

Expand Down
1 change: 1 addition & 0 deletions Products/GenericSetup/ZCatalog/tests/test_exportimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class _extra:
</object>
%s <index name="foo_date" meta_type="DateIndex">
<property name="index_naive_time_as_local">True</property>
<property name="precision">1</property>
</index>
<index name="foo_daterange" meta_type="DateRangeIndex" since_field="bar"
until_field="baz"/>
Expand Down
2 changes: 2 additions & 0 deletions Products/GenericSetup/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ def _importBody(self, body):
filename = (self.filename or
'/'.join(self.context.getPhysicalPath()))
raise ExpatError('%s: %s' % (filename, e))
# Replace the encoding with the one from the XML
self._encoding = dom.encoding or 'utf-8'
self._importNode(dom.documentElement)

body = property(_exportBody, _importBody)
Expand Down
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ github_push = git@github.com:zopefoundation
[sources]
AccessControl = git ${remotes:github}/AccessControl.git pushurl=${remotes:github_push}/AccessControl.git branch=master
Products.MailHost = git ${remotes:github}/Products.MailHost pushurl=${remotes:github_push}/Products.MailHost
Zope = git ${remotes:github}/Zope pushurl=${remotes:github_push}/Zope branch=lines-property
Zope = git ${remotes:github}/Zope pushurl=${remotes:github_push}/Zope branch=master

[test]
recipe = zc.recipe.testrunner
Expand Down

0 comments on commit 5516515

Please sign in to comment.