File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,6 +56,14 @@ def test_should_serve_static_files(self):
5656 response = requests .get ("http://localhost/static/theme/wirecloud.defaulttheme/images/logos/header.png" )
5757 self .assertEqual (response .status_code , 200 )
5858
59+ def test_should_serve_translations (self ):
60+ response = requests .get ("http://localhost/api/i18n/js_catalogue?language=es" )
61+ self .assertEqual (response .status_code , 200 )
62+ # Look for basic translations
63+ self .assertIn ('"Yes"' , response .text )
64+ self .assertIn ('"No"' , response .text )
65+ self .assertIn ('"Warning"' , response .text )
66+
5967
6068if __name__ == "__main__" :
6169 unittest .main (verbosity = 2 )
Original file line number Diff line number Diff line change @@ -56,6 +56,14 @@ def test_should_serve_static_files(self):
5656 response = requests .get ("http://localhost/static/theme/wirecloud.defaulttheme/images/logos/header.png" )
5757 self .assertEqual (response .status_code , 200 )
5858
59+ def test_should_serve_translations (self ):
60+ response = requests .get ("http://localhost/api/i18n/js_catalogue?language=es" )
61+ self .assertEqual (response .status_code , 200 )
62+ # Look for basic translations
63+ self .assertIn ('"Yes"' , response .text )
64+ self .assertIn ('"No"' , response .text )
65+ self .assertIn ('"Warning"' , response .text )
66+
5967
6068if __name__ == "__main__" :
6169 unittest .main (verbosity = 2 )
Original file line number Diff line number Diff line change @@ -35,6 +35,14 @@ def test_should_serve_static_files(self):
3535 response = requests .get ("http://localhost/static/theme/wirecloud.defaulttheme/images/logos/header.png" )
3636 self .assertEqual (response .status_code , 200 )
3737
38+ def test_should_serve_translations (self ):
39+ response = requests .get ("http://localhost/api/i18n/js_catalogue?language=es" )
40+ self .assertEqual (response .status_code , 200 )
41+ # Look for basic translations
42+ self .assertIn ('"Yes"' , response .text )
43+ self .assertIn ('"No"' , response .text )
44+ self .assertIn ('"Warning"' , response .text )
45+
3846
3947class StandaloneTests (unittest .TestCase , WireCloudTests ):
4048
Original file line number Diff line number Diff line change @@ -29,12 +29,15 @@ RUN apt-get update && \
2929
3030# Install WireCloud & dependencies
3131RUN git clone --depth=1 https://github.com/Wirecloud/wirecloud.git && \
32+ apt-get update && apt-get install -y gettext && \
3233 pip install "django<=1.11" && \
3334 cd wirecloud/src && \
3435 python setup.py bdist_wheel && \
3536 pip install --no-cache-dir dist/*.whl && \
3637 cd ../.. && \
37- rm -rf wirecloud
38+ rm -rf wirecloud && \
39+ apt-get remove -y gettext && \
40+ rm -rf /var/lib/apt/lists/*
3841
3942COPY ./docker-entrypoint.sh /
4043COPY ./manage.py /usr/local/bin/
Original file line number Diff line number Diff line change @@ -35,6 +35,14 @@ def test_should_serve_static_files(self):
3535 response = requests .get ("http://localhost/static/theme/wirecloud.defaulttheme/images/logos/header.png" )
3636 self .assertEqual (response .status_code , 200 )
3737
38+ def test_should_serve_translations (self ):
39+ response = requests .get ("http://localhost/api/i18n/js_catalogue?language=es" )
40+ self .assertEqual (response .status_code , 200 )
41+ # Look for basic translations
42+ self .assertIn ('"Yes"' , response .text )
43+ self .assertIn ('"No"' , response .text )
44+ self .assertIn ('"Warning"' , response .text )
45+
3846
3947class StandaloneTests (unittest .TestCase , WireCloudTests ):
4048
You can’t perform that action at this time.
0 commit comments