Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
3b6f33f5
Commit
3b6f33f5
authored
Aug 02, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix github_sync tests
* CMS no longer syncs, it just imports when it gets a commit note from github
parent
95e139f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
cms/djangoapps/github_sync/tests/test_views.py
+12
-12
No files found.
cms/djangoapps/github_sync/tests/test_views.py
View file @
3b6f33f5
...
...
@@ -11,33 +11,33 @@ class PostReceiveTestCase(TestCase):
def
setUp
(
self
):
self
.
client
=
Client
()
@patch
(
'github_sync.views.
sync_with
_github'
)
def
test_non_branch
(
self
,
sync_with
_github
):
@patch
(
'github_sync.views.
import_from
_github'
)
def
test_non_branch
(
self
,
import_from
_github
):
self
.
client
.
post
(
'/github_service_hook'
,
{
'payload'
:
json
.
dumps
({
'ref'
:
'refs/tags/foo'
})
})
self
.
assertFalse
(
sync_with
_github
.
called
)
self
.
assertFalse
(
import_from
_github
.
called
)
@patch
(
'github_sync.views.
sync_with
_github'
)
def
test_non_watched_repo
(
self
,
sync_with
_github
):
@patch
(
'github_sync.views.
import_from
_github'
)
def
test_non_watched_repo
(
self
,
import_from
_github
):
self
.
client
.
post
(
'/github_service_hook'
,
{
'payload'
:
json
.
dumps
({
'ref'
:
'refs/heads/branch'
,
'repository'
:
{
'name'
:
'bad_repo'
}})
})
self
.
assertFalse
(
sync_with
_github
.
called
)
self
.
assertFalse
(
import_from
_github
.
called
)
@patch
(
'github_sync.views.
sync_with
_github'
)
def
test_non_tracked_branch
(
self
,
sync_with
_github
):
@patch
(
'github_sync.views.
import_from
_github'
)
def
test_non_tracked_branch
(
self
,
import_from
_github
):
self
.
client
.
post
(
'/github_service_hook'
,
{
'payload'
:
json
.
dumps
({
'ref'
:
'refs/heads/non_branch'
,
'repository'
:
{
'name'
:
'repo'
}})
})
self
.
assertFalse
(
sync_with
_github
.
called
)
self
.
assertFalse
(
import_from
_github
.
called
)
@patch
(
'github_sync.views.
sync_with
_github'
)
def
test_tracked_branch
(
self
,
sync_with
_github
):
@patch
(
'github_sync.views.
import_from
_github'
)
def
test_tracked_branch
(
self
,
import_from
_github
):
self
.
client
.
post
(
'/github_service_hook'
,
{
'payload'
:
json
.
dumps
({
'ref'
:
'refs/heads/branch'
,
'repository'
:
{
'name'
:
'repo'
}})
})
sync_with
_github
.
assert_called_with
(
load_repo_settings
(
'repo'
))
import_from
_github
.
assert_called_with
(
load_repo_settings
(
'repo'
))
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