'Test the uploaded path of mugshots
TODO: What if a image get\'s uploaded with no extension?'

def test_upload_mugshot(self):

    user = User.objects.get(pk=1)
    filename = 'my_avatar.png'
    path = upload_to_mugshot(get_user_profile(user=user), filename)
    self.assertNotEqual(filename, path)
    MUGSHOT_RE = re.compile(('^%(mugshot_path)s[a-f0-9]{10}.png$' % {'mugshot_path': userena_settings.USERENA_MUGSHOT_PATH}))
    self.assertTrue(MUGSHOT_RE.search(path))
