def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(DistanceTest)) s.addTest(unittest.makeSuite(AreaTest)) return s
def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(ListMixinTest)) s.addTest(unittest.makeSuite(ListMixinTestSingle)) return s
def getSuite(): return unittest.makeSuite(Tester,'test')
def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(EnvelopeTest)) return s
def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(SpatialRefSysTest)) return s
self.assertTrue(pl + [5] > ul, 'cmp') self.assertTrue(pl + [5] >= ul, 'cmp') self.assertTrue(pl < ul + [2], 'cmp') self.assertTrue(pl <= ul + [2], 'cmp') self.assertTrue(ul + [5] > pl, 'cmp') self.assertTrue(ul + [5] >= pl, 'cmp') self.assertTrue(ul < pl + [2], 'cmp') self.assertTrue(ul <= pl + [2], 'cmp') pl[1] = 20 self.assertTrue(pl > ul, 'cmp for gt self') self.assertTrue(ul < pl, 'cmp for self lt') pl[1] = -20 self.assertTrue(pl < ul, 'cmp for lt self') self.assertTrue(pl < ul, 'cmp for lt self') class ListMixinTestSingle(ListMixinTest): listType = UserListB def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(ListMixinTest)) s.addTest(unittest.makeSuite(ListMixinTestSingle)) return s def run(verbosity=2): unittest.TextTestRunner(verbosity=verbosity).run(suite()) if __name__ == '__main__': run()
def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(LayerMapTest)) return s
def getSuite(): return unittest.makeSuite(DispatcherTests,'test')
def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(UnaccentTestCase)) return s
def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(GeoIPTest)) return s
'lorem': 'ipsum', 'dolor': 'sit amet'} session_json = simplejson.dumps(session) fb = fbkit.Facebook(my_app_secret, app_id=my_app_id) self.assertEqual(fb.validate_oauth_session(session_json), {'lorem': 'ipsum', 'dolor': 'sit amet'}) def test_login_url(self): response = 'abcdef' self.urlopen.next_response = simplejson.dumps(response) fb = fbkit.Facebook(my_app_secret, app_id=my_app_id) fb.auth.createToken() self.assertEquals(str(fb.auth_token), "abcdef") url = fb.get_login_url(next="nowhere", popup=True) expected = ('https://graph.facebook.com/oauth/authorize?' 'redirect_uri=nowhere&display=popup&client_id=%s' % my_app_id) self.assertEquals(url, expected) if __name__ == "__main__": # Build the test suite suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(FBKitTests)) # Execute the test suite print("Testing Proxy class\n") result = unittest.TextTestRunner(verbosity=2).run(suite) sys.exit(len(result.errors) + len(result.failures))
session_json = simplejson.dumps(session) fb = fbkit.Facebook(my_app_secret, app_id=my_app_id) self.assertEqual(fb.validate_oauth_session(session_json), { 'lorem': 'ipsum', 'dolor': 'sit amet' }) def test_login_url(self): response = 'abcdef' self.urlopen.next_response = simplejson.dumps(response) fb = fbkit.Facebook(my_app_secret, app_id=my_app_id) fb.auth.createToken() self.assertEquals(str(fb.auth_token), "abcdef") url = fb.get_login_url(next="nowhere", popup=True) expected = ('https://graph.facebook.com/oauth/authorize?' 'redirect_uri=nowhere&display=popup&client_id=%s' % my_app_id) self.assertEquals(url, expected) if __name__ == "__main__": # Build the test suite suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(FBKitTests)) # Execute the test suite print("Testing Proxy class\n") result = unittest.TextTestRunner(verbosity=2).run(suite) sys.exit(len(result.errors) + len(result.failures))
def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(GEOSTest)) return s
self.assertEqual(cached_value, 'my_value') def test_zones(self): zonecache.add('my_key', 'my_value', zone='my_zone') cached_value = zonecache.get('my_key', zone='my_zone') self.assertEqual(cached_value, 'my_value') zonecache.invalidate_zone('my_zone') cached_value = zonecache.get('my_key', zone='my_zone') self.assertEqual(cached_value, None) zonecache.add('my_key', 'my_value', zone='my_zone') cached_value = zonecache.get('my_key', zone='my_zone') self.assertEqual(cached_value, 'my_value') def test_zone_version(self): zonecache.invalidate_zone('my_zone') zonecache.add('my_key', 'my_value', version=2, zone='my_zone') zonecache.add('my_key', 'my_value_2', version=3, zone='my_zone') cached_value = zonecache.get('my_key', version=2, zone='my_zone') self.assertEqual(cached_value, 'my_value') cached_value = zonecache.get('my_key', version=3, zone='my_zone') self.assertEqual(cached_value, 'my_value_2') suite = TestSuite() suite.addTest(makeSuite(ZoneCacheTest))
def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(GeometryFieldTest)) return s
def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(GEOSMutationTest)) return s
def suite(): test = unittest.TestSuite() test.addTest(unittest.makeSuite(TestModelForm)) return test
def suite(): s = unittest.TestSuite() s.addTest(unittest.makeSuite(OGRGeomTest)) return s
def suite(): test = unittest.TestSuite() test.addTest(unittest.makeSuite(TestLanguages)) return test