Tetiana Lashchova 38513f7dc5 Fix order of arguments in assertEqual
Some tests used incorrect order of arguments in assertEqual.
The correct order expected by testtools is
assertEqual(expected, observed).

Change-Id: I210ce20cb9427799219e8aedb9ee3282dea53d3f
Closes-Bug: #1259292
2015-09-29 15:38:33 +03:00

44 lines
1.6 KiB
Python

#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import imghdr
import os
import murano.packages.load_utils as load_utils
import murano.tests.unit.base as test_base
class TestMplV1(test_base.MuranoTestCase):
def test_supplier_info_load(self):
package_dir = os.path.abspath(
os.path.join(__file__, '../../test_packages/test.mpl.v1.app')
)
package = load_utils.load_from_dir(package_dir)
self.assertNotEqual(package.supplier, None)
self.assertEqual('Supplier Name', package.supplier['Name'])
self.assertEqual({'Link': 'http://example.com',
'Text': 'Example Company'},
package.supplier['CompanyUrl'])
self.assertEqual(
'Company summary goes here',
package.supplier['Summary']
)
self.assertEqual(
'Marked up company description goes here',
package.supplier['Description']
)
self.assertEqual('test_supplier_logo.png', package.supplier['Logo'])
self.assertEqual('png', imghdr.what('', package.supplier_logo))