--- /dev/null
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+
+# C extensions
+*.so
+
+# Distribution / packaging
+bin/
+build/
+develop-eggs/
+dist/
+eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+.tox/
+.coverage
+.cache
+nosetests.xml
+coverage.xml
+
+# Translations
+*.mo
+
+# Mr Developer
+.mr.developer.cfg
+.project
+.pydevproject
+
+# Rope
+.ropeproject
+
+# Django stuff:
+*.log
+*.pot
+
+# Sphinx documentation
+docs/_build/
+
--- /dev/null
+#!/usr/bin/env python
+
+"""Tests for render module."""
+
+import unittest
+from snapdiff import render
+
+
+class RenderTestCase(unittest.TestCase):
+
+ def test_output_html(self):
+ """Ensures that we can properly render html pages"""
+ users = [{'url': 'http://example.com', 'username': 'foo'}]
+ output = render.output_html('sparrow.html', users=users)
+ self.assertEqual(output, u'<ul>\n\n <li><a href="http://example.com">foo</a></li>\n\n</ul>\n')
+
--- /dev/null
+"""Tests for utils module."""
+
+import unittest
+from snapdiff import utils
+
+
+class UtilsTestCase(unittest.TestCase):
+
+ _multiprocess_can_split_ = True
+
+ def test_xml2obj(self):
+ """Ensures that we can properly parse xml to python objs"""
+ repomd = """<?xml version="1.0" ?>
+ <repomd>
+ <revision>1385428310</revision>
+ <data type="other_db">
+ <location href="repodata/0b19c6c1677b8ab3f7-other.sqlite.bz2"/>
+ <checksum type="sha256">06d90b19c6c1677b8ab3f7</checksum>
+ <timestamp>1385428316.34</timestamp>
+ <size>251882</size>
+ <open-size>952320</open-size>
+ <open-checksum type="sha256">71428390a3e9423abb</open-checksum>
+ <database_version>10</database_version>
+ </data>
+ <data type="group">
+ <location href="repodata/df569d7923ed3f60943449-group.xml.gz"/>
+ <checksum type="sha256">df569d7923ed3f60943449</checksum>
+ <timestamp>1385428350.75</timestamp>
+ <open-checksum type="sha256">aab93a15ded699ffd46</open-checksum>
+ </data>
+ </repomd>
+ """
+
+ obj = utils.xml2obj(repomd)
+ self.assertEqual(obj.revision, '1385428310')
+ self.assertTrue(isinstance(obj['data'], list))
+ self.assertEqual(obj['data'][0].size, '251882')
+