Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
ParsePy
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
OpenEdx
ParsePy
Commits
e7602e16
Commit
e7602e16
authored
Mar 12, 2013
by
Raphael Lullis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getting installation module to work. Updating setup.py
parent
3a7d71e3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
20 deletions
+11
-20
parse_rest/installation.py
+4
-12
setup.py
+7
-8
No files found.
parse_rest/installation.py
View file @
e7602e16
...
...
@@ -11,20 +11,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import
__init__
as
parse_rest
from
__init__
import
API_ROOT
,
ParseResource
from
connection
import
API_ROOT
from
datatypes
import
ParseResource
from
query
import
QueryManager
class
InstallationManager
(
QueryManager
):
def
__init__
(
self
):
self
.
_model_class
=
Installation
def
_fetch
(
self
,
**
kw
):
kw
[
'extra_headers'
]
=
{
'X-Parse-Master-Key'
:
parse_rest
.
MASTER_KEY
}
response
=
Installation
.
GET
(
Installation
.
ENDPOINT_ROOT
,
**
kw
)
return
[
Installation
(
**
it
)
for
it
in
response
.
get
(
'results'
)]
class
Installation
(
ParseResource
):
ENDPOINT_ROOT
=
'/'
.
join
([
API_ROOT
,
'installations'
])
...
...
@@ -42,4 +33,5 @@ class Push(ParseResource):
targets
[
'where'
]
=
kw
return
cls
.
POST
(
''
,
data
=
alert_message
,
**
targets
)
Installation
.
Query
=
InstallationManager
()
Installation
.
Query
=
QueryManager
(
Installation
)
setup.py
View file @
e7602e16
...
...
@@ -3,7 +3,7 @@ from unittest import TextTestRunner, TestLoader
class
TestCommand
(
Command
):
"""Run test suite using 'python setup.py test'"""
'''Run test suite using `python setup.py test `'''
user_options
=
[]
def
initialize_options
(
self
):
...
...
@@ -13,22 +13,21 @@ class TestCommand(Command):
pass
def
run
(
self
):
"""Run test suite in parse_rest.tests"""
from
parse_rest
import
tests
tests
=
TestLoader
()
.
loadTestsFromNames
([
"parse_rest.tests"
])
'''Run test suite in parse_rest.tests'''
tests
=
TestLoader
()
.
loadTestsFromNames
([
'parse_rest.tests'
])
t
=
TextTestRunner
(
verbosity
=
1
)
t
.
run
(
tests
)
setup
(
name
=
'parse_rest'
,
version
=
'0.
10.2013
'
,
version
=
'0.
2.20130312
'
,
description
=
'A client library for Parse.com
\'
.s REST API'
,
url
=
'https://github.com/dgrtwo/ParsePy'
,
packages
=
[
'parse_rest'
],
maintainer
=
"David Robinson"
,
maintainer_email
=
"dgrtwo@princeton.edu"
,
cmdclass
=
{
"test"
:
TestCommand
},
maintainer
=
'David Robinson'
,
maintainer_email
=
'dgrtwo@princeton.edu'
,
cmdclass
=
{
'test'
:
TestCommand
},
classifiers
=
[
'Development Status :: 4 - Beta'
,
'Environment :: Web Environment'
,
...
...
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