Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added tests #32

Merged
merged 2 commits into from

2 participants

@d1ffuz0r

Added tests

@perone perone merged commit cc68eae into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 27, 2012
  1. @d1ffuz0r

    add tests

    d1ffuz0r authored
  2. @d1ffuz0r

    add tests

    d1ffuz0r authored
This page is out of date. Refresh to see the latest.
Showing with 29 additions and 0 deletions.
  1. +29 −0 tests/test_main.py
View
29 tests/test_main.py
@@ -0,0 +1,29 @@
+import sys
+sys.path.insert(0, '.')
+
+import unittest
+from stallion import main
+from xmlrpclib import ServerProxy
+import pkg_resources as _pkg_resources
+
+
+class TestMain(unittest.TestCase):
+
+ def test_crumb_params_true(self):
+ crumb = main.Crumb(title='TestCrumb',
+ href='#testcrumb')
+ self.assertEqual(crumb.title, 'TestCrumb')
+ self.assertEqual(crumb.href, '#testcrumb')
+
+ def test_pypi_proxy_instance_true(self):
+ proxy = main.get_pypi_proxy()
+ self.assertTrue(isinstance(proxy, ServerProxy))
+
+ def test_get_shared_data_instance_true(self):
+ data = main.get_shared_data()
+ self.assertTrue(isinstance(data, dict))
+ self.assertEqual(data.keys(), ['pypi_update_cache', 'distributions'])
+
+ def test_get_pkg_res_instance_true(self):
+ pkg = main.get_pkg_res()
+ self.assertEqual(pkg, _pkg_resources)
Something went wrong with that request. Please try again.