def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(DistanceTest))
    s.addTest(unittest.makeSuite(AreaTest))
    return s
Example #2
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(ListMixinTest))
    s.addTest(unittest.makeSuite(ListMixinTestSingle))
    return s
Example #3
0
def getSuite():
    return unittest.makeSuite(Tester,'test')
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(EnvelopeTest))
    return s
Example #5
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(SpatialRefSysTest))
    return s
Example #6
0
        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()
Example #7
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(LayerMapTest))
    return s
Example #8
0
def getSuite():
    return unittest.makeSuite(DispatcherTests,'test')
Example #9
0
File: tests.py Project: umdsp/romeu
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(UnaccentTestCase))
    return s
Example #10
0
def getSuite():
    return unittest.makeSuite(Tester,'test')
Example #11
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(GeoIPTest))
    return s
Example #12
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(EnvelopeTest))
    return s
Example #13
0
                   '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))
Example #14
0
        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))
Example #15
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(GEOSTest))
    return s
Example #16
0
        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))
Example #17
0
File: tests.py Project: umdsp/romeu
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(UnaccentTestCase))
    return s
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(GeometryFieldTest))
    return s
Example #19
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(GEOSMutationTest))
    return s
Example #20
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(ListMixinTest))
    s.addTest(unittest.makeSuite(ListMixinTestSingle))
    return s
Example #21
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(DistanceTest))
    s.addTest(unittest.makeSuite(AreaTest))
    return s
def suite():
    test = unittest.TestSuite()
    test.addTest(unittest.makeSuite(TestModelForm))
    return test
Example #23
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(OGRGeomTest))
    return s
Example #24
0
def suite():
	s = unittest.TestSuite()
	s.addTest(unittest.makeSuite(GeometryFieldTest))
	return s
Example #25
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(SpatialRefSysTest))
    return s
Example #26
0
def suite():
    s = unittest.TestSuite()
    s.addTest(unittest.makeSuite(OGRGeomTest))
    return s
Example #27
0
def getSuite():
    return unittest.makeSuite(DispatcherTests,'test')
def suite():
    test = unittest.TestSuite()
    test.addTest(unittest.makeSuite(TestLanguages))
    return test