Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
cb38adb0
Unverified
Commit
cb38adb0
authored
5 years ago
by
Nick Draper
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #28402 from mantidproject/RemoveERsystest
Remove ErrorReporterServerTest
parents
1b82395b
7b5df7e8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Testing/SystemTests/tests/analysis/ErrorReporterServerTest.py
+0
-71
0 additions, 71 deletions
...ing/SystemTests/tests/analysis/ErrorReporterServerTest.py
with
0 additions
and
71 deletions
Testing/SystemTests/tests/analysis/ErrorReporterServerTest.py
deleted
100644 → 0
+
0
−
71
View file @
1b82395b
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
from
mantid.py3compat
import
mock
import
systemtesting
from
ErrorReporter.error_report_presenter
import
ErrorReporterPresenter
# noqa
class
ErrorReportServerTests
(
systemtesting
.
MantidSystemTest
):
def
setUp
(
self
):
mock_view
=
mock
.
MagicMock
()
self
.
error_report_presenter
=
ErrorReporterPresenter
(
mock_view
,
'
1
'
)
def
test_no_share_sends_nothing
(
self
):
status
=
self
.
error_report_presenter
.
error_handler
(
True
,
2
,
''
,
''
,
''
)
self
.
assertEqual
(
status
,
-
1
)
def
test_share_non_identifiable_returns_created_status
(
self
):
status
=
self
.
error_report_presenter
.
error_handler
(
True
,
1
,
''
,
''
,
''
)
self
.
assertEqual
(
status
,
201
)
def
test_share_identifiable_works_for_empty_values
(
self
):
status
=
self
.
error_report_presenter
.
error_handler
(
True
,
0
,
''
,
''
,
''
)
self
.
assertEqual
(
status
,
201
)
def
test_share_identifiable_works_for_just_name
(
self
):
status
=
self
.
error_report_presenter
.
error_handler
(
True
,
0
,
'
public_name
'
,
''
,
''
)
self
.
assertEqual
(
status
,
201
)
def
test_share_identifiable_works_for_just_email
(
self
):
status
=
self
.
error_report_presenter
.
error_handler
(
True
,
0
,
''
,
'
public_email
'
,
''
)
self
.
assertEqual
(
status
,
201
)
def
test_share_identifiable_works_for_just_textbox
(
self
):
status
=
self
.
error_report_presenter
.
error_handler
(
True
,
0
,
''
,
''
,
'
Something went wrong
'
)
self
.
assertEqual
(
status
,
201
)
def
test_share_identifiable_works_with_no_name
(
self
):
status
=
self
.
error_report_presenter
.
error_handler
(
True
,
0
,
''
,
'
public_email
'
,
'
Something went wrong
'
)
self
.
assertEqual
(
status
,
201
)
def
test_share_identifiable_works_with_no_email
(
self
):
status
=
self
.
error_report_presenter
.
error_handler
(
True
,
0
,
'
public_name
'
,
''
,
'
Something went wrong
'
)
self
.
assertEqual
(
status
,
201
)
def
test_share_identifiable_works_with_no_textbox
(
self
):
status
=
self
.
error_report_presenter
.
error_handler
(
True
,
0
,
'
public_name
'
,
'
public_email
'
,
''
)
self
.
assertEqual
(
status
,
201
)
def
test_share_identifiable_works_with_all
(
self
):
status
=
self
.
error_report_presenter
.
error_handler
(
True
,
0
,
'
public_name
'
,
'
public_email
'
,
'
Something went wrong
'
)
self
.
assertEqual
(
status
,
201
)
def
excludeInPullRequests
(
self
):
return
True
def
runTest
(
self
):
self
.
setUp
()
self
.
test_no_share_sends_nothing
()
self
.
test_share_non_identifiable_returns_created_status
()
self
.
test_share_identifiable_works_for_empty_values
()
self
.
test_share_identifiable_works_for_just_name
()
self
.
test_share_identifiable_works_for_just_email
()
self
.
test_share_identifiable_works_for_just_textbox
()
self
.
test_share_identifiable_works_with_no_name
()
self
.
test_share_identifiable_works_with_no_email
()
self
.
test_share_identifiable_works_with_no_textbox
()
self
.
test_share_identifiable_works_with_all
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment