+
+ def test_prepare_dev(self):
+ '''Test the prepare command with a product in dev mode
+ '''
+ OK = 'KO'
+
+ appli = 'appli-test'
+ product_name = 'PRODUCT_DEV'
+
+ sat = Sat()
+
+ sat.config(appli)
+
+ expected_src_dir = src.product.get_product_config(sat.cfg, product_name).source_dir
+ expected_file_path = os.path.join(expected_src_dir, 'my_test_file.txt')
+ expected_text = 'HELLO WORLD\n'
+
+ if os.path.exists(expected_src_dir):
+ shutil.rmtree(expected_src_dir)
+
+ sat.prepare(appli + ' --product ' + product_name)
+
+ f = open(expected_file_path, 'r')
+ text = f.readlines()[0]
+ if text == expected_text:
+ OK = 'OK'
+
+ # pyunit method to compare 2 str
+ self.assertEqual(OK, 'OK')
+