[ADD] Test module
authorFabien Meghazi <fme@openerp.com>
Wed, 26 Mar 2014 15:14:11 +0000 (16:14 +0100)
committerFabien Meghazi <fme@openerp.com>
Wed, 26 Mar 2014 15:14:11 +0000 (16:14 +0100)
Test suite is still todo

bzr revid: fme@openerp.com-20140326151411-moo1yuozvpgro1mh

addons/base_import_module/tests/test_module/__openerp__.py [new file with mode: 0644]
addons/base_import_module/tests/test_module/static/src/img/c64.png [new file with mode: 0644]
addons/base_import_module/tests/test_module/static/src/js/test.js [new file with mode: 0644]
addons/base_import_module/tests/test_module/test.xml [new file with mode: 0644]

diff --git a/addons/base_import_module/tests/test_module/__openerp__.py b/addons/base_import_module/tests/test_module/__openerp__.py
new file mode 100644 (file)
index 0000000..b0ecb36
--- /dev/null
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+{
+    'name': 'Test Module',
+    'category': 'Website',
+    'summary': 'Custom',
+    'version': '1.0',
+    'description': """
+        Test
+        """,
+    'author': 'OpenERP SA',
+    'depends': ['website'],
+    'data': [
+        'test.xml',
+    ],
+    'installable': True,
+    'application': True,
+}
diff --git a/addons/base_import_module/tests/test_module/static/src/img/c64.png b/addons/base_import_module/tests/test_module/static/src/img/c64.png
new file mode 100644 (file)
index 0000000..3e8183f
Binary files /dev/null and b/addons/base_import_module/tests/test_module/static/src/img/c64.png differ
diff --git a/addons/base_import_module/tests/test_module/static/src/js/test.js b/addons/base_import_module/tests/test_module/static/src/js/test.js
new file mode 100644 (file)
index 0000000..de803c8
--- /dev/null
@@ -0,0 +1 @@
+console.log('test_module javascript');
diff --git a/addons/base_import_module/tests/test_module/test.xml b/addons/base_import_module/tests/test_module/test.xml
new file mode 100644 (file)
index 0000000..53c7d68
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+<data>
+    <!-- TODO: make test suite -->
+    <record id="base.main_company2" model="res.company">
+        <field name="name">Module Import Success</field>
+    </record>
+    <record id="main_company2" model="res.company">
+        <field name="name">Hagrid</field>
+        <field name="rml_header1">Your Company Tagline</field>
+        <field name="currency_id" ref="base.EUR"/>
+    </record>
+
+    <template id="test" name="Test Page" page="True">
+        <t t-call="website.layout">
+            <h1>
+                This page comes from an imported module!
+            </h1>
+            <p>
+                And this static image too !
+                <img src="/test_module/static/src/img/c64.png"/>
+            </p>
+        </t>
+    </template>
+
+    <template id="website.contactus" name="Test Import" page="True">
+        <t t-call="website.layout">
+            <h1>This page has been overwritten by an uploaded module</h1>
+        </t>
+    </template>
+
+</data>
+</openerp>