Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Merge c9e7112 into a688099
Browse files Browse the repository at this point in the history
  • Loading branch information
moylop260 committed Aug 18, 2015
2 parents a688099 + c9e7112 commit 84a890f
Show file tree
Hide file tree
Showing 17 changed files with 615 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tests/test_repo/broken_lint/__init__.py
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-

from . import case_import
11 changes: 11 additions & 0 deletions tests/test_repo/broken_lint/__openerp__.py
@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
{
'name': 'Broken module for lint tests',
'license': 'AGPL-3',
'author': 'Odoo Community Association (OCA)',
'version': '1.0',
'depends': [],
'data': [],
'test': [],
'installable': False,
}
49 changes: 49 additions & 0 deletions tests/test_repo/broken_lint/case_import.py
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-

import openerp

from openerp import api
from openerp.api import one

from openerp.exceptions import Warning as UserError
from openerp.exceptions import Warning as OtherName
from openerp.exceptions import Warning
from openerp.exceptions import AccessError as AE, \
ValidationError, Warning as UserError2


class UseUnusedImport(object):
def method1(self):
return UserError, OtherName, Warning, AE, ValidationError, UserError2


class ApiOne(object):
@api.one
def copy():
pass


class One(object):
@one
def copy():
pass


class OpenerpApiOne(object):
@openerp.api.one
def copy():
pass


class WOApiOne(object):
# copy without api.one decorator
def copy():
pass


class ApiOneMultiTogether(object):

@api.multi
@api.one
def copy():
pass
4 changes: 4 additions & 0 deletions tests/test_repo/broken_module/README.rst
@@ -0,0 +1,4 @@
Module broken
===============
``````````
syntax error
5 changes: 4 additions & 1 deletion tests/test_repo/broken_module/__init__.py
@@ -1,2 +1,5 @@
# -*- coding: utf-8 -*-
#!/usr/bin/python
# -*- coding: latin-1 -*-
from . import model
from . import interpreter_wox
# execution permission and interpreter done
3 changes: 3 additions & 0 deletions tests/test_repo/broken_module/__openerp__.py
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
{
'name': 'Broken module for tests',
# missing license
'author': 'Many People', # Missing oca author
'description': 'Should be a README.rst file',
'version': '1.0',
'depends': ['base'],
'data': [],
Expand Down
4 changes: 4 additions & 0 deletions tests/test_repo/broken_module/doc/index.rst
@@ -0,0 +1,4 @@
Module broken
===============
``````````
syntax error
5 changes: 5 additions & 0 deletions tests/test_repo/broken_module/interpreter_wox.py
@@ -0,0 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-


"Module python with interpreter but without execute permission."
Empty file modified tests/test_repo/broken_module/model.py 100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions tests/test_repo/broken_module/tests/__init__.py
@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import dummy_test
12 changes: 12 additions & 0 deletions tests/test_repo/broken_module/tests/dummy_test.py
@@ -0,0 +1,12 @@
# missing coding
"""This file don't is add to main __init__
We need to validate that check py errors"""

try:
from openerp.exceptions import Warning
except ImportError:
pass


def using_imported():
return Warning
2 changes: 2 additions & 0 deletions tests/test_repo/second_module/__openerp__.py
Expand Up @@ -2,6 +2,8 @@
{
'name': 'Second empty module for tests',
'version': '1.0',
'author': 'Odoo Community Association (OCA)',
'license': 'AGPL-3',
'depends': [
'base',
'test_module',
Expand Down
9 changes: 9 additions & 0 deletions tests/test_repo/test_module/README.rst
@@ -0,0 +1,9 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

Test module
===========

This module was written to check the test of rst syntax.
This is a rst file without syntax error.

2 changes: 2 additions & 0 deletions tests/test_repo/test_module/__openerp__.py
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
{
'name': 'Empty module for tests',
'license': 'AGPL-3',
'author': 'Odoo Community Association (OCA)',
'version': '1.0',
'depends': [
'base',
Expand Down
9 changes: 9 additions & 0 deletions tests/test_repo/test_module/doc/index.rst
@@ -0,0 +1,9 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

Test module
===========

This module was written to check the test of rst syntax.
This is a rst file without syntax error.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 84a890f

Please sign in to comment.