Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-lti-consumer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
xblock-lti-consumer
Commits
9baeeb37
Commit
9baeeb37
authored
May 04, 2017
by
Qubad786
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert to django app
parent
b47f57f8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
4 deletions
+41
-4
.coveragerc
+4
-0
.gitignore
+1
-2
scripts/test.sh
+1
-2
test.py
+34
-0
test_requirements.txt
+1
-0
No files found.
.coveragerc
0 → 100644
View file @
9baeeb37
# .coveragerc for xblock-lti-consumer
[run]
data_file = .coverage
source = lti_consumer
.gitignore
View file @
9baeeb37
...
@@ -14,4 +14,4 @@ codekit-config.json
...
@@ -14,4 +14,4 @@ codekit-config.json
### Testing artifacts
### Testing artifacts
.coverage
.coverage
var/
var/
\ No newline at end of file
scripts/test.sh
View file @
9baeeb37
#!/usr/bin/env bash
#!/usr/bin/env bash
set
-e
set
-e
export
DJANGO_SETTINGS_MODULE
=
"workbench.settings"
mkdir
-p
var
mkdir
-p
var
rm
-rf
.coverage
rm
-rf
.coverage
nosetests
--with-coverage
--cover-package
=
"lti_consumer"
python
-m
coverage run
--rcfile
=
.coveragerc ./test.py
$1
--noinput
test.py
0 → 100644
View file @
9baeeb37
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Run tests for the LTI Consumer XBlock
"""
import
os
import
sys
if
__name__
==
'__main__'
:
os
.
environ
.
setdefault
(
'DJANGO_SETTINGS_MODULE'
,
u'workbench.settings'
)
try
:
from
django.conf
import
settings
# pylint: disable=wrong-import-position
from
django.core.management
import
execute_from_command_line
# pylint: disable=wrong-import-position
except
ImportError
:
# The above import may fail for some other reason. Ensure that the
# issue is really that Django is missing to avoid masking other
# exceptions on Python 2.
try
:
import
django
# pylint: disable=unused-import, wrong-import-position
except
ImportError
:
raise
ImportError
(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
)
raise
settings
.
INSTALLED_APPS
+=
(
u'lti_consumer'
,)
arguments
=
sys
.
argv
[
1
:]
options
=
[
argument
for
argument
in
arguments
if
argument
.
startswith
(
'-'
)]
paths
=
[
argument
for
argument
in
arguments
if
argument
not
in
options
]
execute_from_command_line
([
sys
.
argv
[
0
],
'test'
]
+
paths
+
options
)
test_requirements.txt
View file @
9baeeb37
-r requirements.txt
-r requirements.txt
django-nose
==1.4.4
astroid
==1.3.8 # Pinning to avoid backwards incompatibility issue with pylint/pylint-django
astroid
==1.3.8 # Pinning to avoid backwards incompatibility issue with pylint/pylint-django
coveralls
coveralls
pep8
pep8
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment