Skip to content
Snippets Groups Projects
Commit 35774899 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

unit test for language html tag generation

parent 7b81782d
No related branches found
No related tags found
1 merge request!100Test coverage unit tests
smash/web/tests/data/PL.png

413 B

import logging
from django.core.files.images import ImageFile
from django.test import TestCase
from web.models import Language
from web.tests.functions import get_resource_path
logger = logging.getLogger(__name__)
class LanguageTests(TestCase):
def test_image_img(self):
language = Language(image=ImageFile(open(get_resource_path("PL.png"), "rb")))
img_html_tag = language.image_img()
self.assertTrue("flag-icon" in img_html_tag)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment