def test_with_user_current_user_is_banned(self):
        # Create a new thread and message
        thread = mommy.make('connectmessages.Thread', group=self.group)
        message = mommy.make(
            'connectmessages.Message', thread=thread, sender=self.banned_user)

        # Create and attach a new image
        image1 = Image()
        image1.user = message.sender
        image1.image = File(open(self.smallfile))
        image1.save()
        message.images.add(image1)

        client = Client()
        client.post(
            reverse('login'),
            {'username': self.banned_user.email, 'password': 'moo'}
        )

        result = client.get(reverse('admin_gallery'))
        self.assertEqual(result.status_code, 200)
        self.assertIn(image1, result.context['images'])
Adds a external port to VIM
dataset/ETHPy150Open ofa/connect/open_connect/media/tests/test_models.py/ImagePopularityManagerTest.test_with_user_current_user_is_banned--crossover with--dataset/ETHPy150Open nfvlabs/openmano/openmano/vimconn.py/vimconnector.new_external_port