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