Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_provider_matching(self):
provider = test_pr.provider_for_url('http://link-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'link')
provider = test_pr.provider_for_url('http://photo-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'photo')
provider = test_pr.provider_for_url('http://video-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'video')
provider = test_pr.provider_for_url('http://rich-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'rich')
provider = test_pr.provider_for_url('http://none-test1')
def test_provider_matching(self):
provider = test_pr.provider_for_url('http://link-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'link')
provider = test_pr.provider_for_url('http://photo-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'photo')
provider = test_pr.provider_for_url('http://video-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'video')
provider = test_pr.provider_for_url('http://rich-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'rich')
provider = test_pr.provider_for_url('http://none-test1')
self.assertTrue(provider is None)
def test_provider_matching(self):
provider = test_pr.provider_for_url('http://link-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'link')
provider = test_pr.provider_for_url('http://photo-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'photo')
provider = test_pr.provider_for_url('http://video-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'video')
provider = test_pr.provider_for_url('http://rich-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'rich')
provider = test_pr.provider_for_url('http://none-test1')
self.assertTrue(provider is None)
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'link')
provider = test_pr.provider_for_url('http://photo-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'photo')
provider = test_pr.provider_for_url('http://video-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'video')
provider = test_pr.provider_for_url('http://rich-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'rich')
provider = test_pr.provider_for_url('http://none-test1')
self.assertTrue(provider is None)
def test_provider_matching(self):
provider = test_pr.provider_for_url('http://link-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'link')
provider = test_pr.provider_for_url('http://photo-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'photo')
provider = test_pr.provider_for_url('http://video-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'video')
provider = test_pr.provider_for_url('http://rich-test1')
self.assertFalse(provider is None)
self.assertEqual(provider.endpoint, 'rich')
provider = test_pr.provider_for_url('http://none-test1')
self.assertTrue(provider is None)