forked from GoogleChrome/chromium-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'GoogleChrome:main' into main
- Loading branch information
Showing
400 changed files
with
32,340 additions
and
12,538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ node_modules | |
# Generated files | ||
static/css/ | ||
static/dist/ | ||
static/js/ | ||
|
||
# OS files | ||
*.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,17 @@ | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import datetime | ||
import testing_config # Must be imported before the module under test. | ||
from unittest import mock | ||
|
||
import flask | ||
from unittest import mock | ||
import werkzeug.exceptions # Flask HTTP stuff. | ||
from chromestatus_openapi.models import ( | ||
Amendment as AmendmentModel, | ||
Activity as ActivityModel, | ||
) | ||
|
||
import testing_config # Must be imported before the module under test. | ||
from api import comments_api | ||
from internals.core_models import FeatureEntry | ||
from internals.review_models import Activity, Amendment, Gate, Vote | ||
|
@@ -34,16 +37,16 @@ class CommentsConvertersTest(testing_config.CustomTestCase): | |
def test_amendment_to_json_dict(self): | ||
amnd = Amendment( | ||
field_name='summary', old_value='foo', new_value='bar') | ||
expected = dict(field_name='summary', old_value='foo', new_value='bar') | ||
actual = comments_api.amendment_to_json_dict(amnd) | ||
expected = AmendmentModel(field_name='summary', old_value='foo', new_value='bar') | ||
actual = comments_api.amendment_to_OAM(amnd) | ||
self.assertEqual(expected, actual) | ||
|
||
def test_amendment_to_json_dict__arrays(self): | ||
"""Arrays are shown without the brackets.""" | ||
amnd = Amendment( | ||
field_name='summary', old_value='[1, 2]', new_value='[1, 2, 3]') | ||
expected = dict(field_name='summary', old_value='1, 2', new_value='1, 2, 3') | ||
actual = comments_api.amendment_to_json_dict(amnd) | ||
expected = AmendmentModel(field_name='summary', old_value='1, 2', new_value='1, 2, 3') | ||
actual = comments_api.amendment_to_OAM(amnd) | ||
self.assertEqual(expected, actual) | ||
|
||
def test_activity_to_json_dict(self): | ||
|
@@ -56,8 +59,8 @@ def test_activity_to_json_dict(self): | |
id=1, feature_id=123, gate_id=456, created=created, | ||
author='[email protected]', content='hello', | ||
amendments=[amnd_1, amnd_2]) | ||
actual = comments_api.activity_to_json_dict(act) | ||
expected = { | ||
actual = comments_api.activity_to_OAM(act) | ||
expected_dict = { | ||
'comment_id': 1, | ||
'feature_id': 123, | ||
'gate_id': 456, | ||
|
@@ -71,6 +74,7 @@ def test_activity_to_json_dict(self): | |
'new_value': 'bar', | ||
}], | ||
} | ||
expected = ActivityModel.from_dict(expected_dict) | ||
self.assertEqual(expected, actual) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ def setUp(self): | |
updater_email='[email protected]', category=1, | ||
owner_emails=['[email protected]'], feature_type=0, | ||
editor_emails=['[email protected]', '[email protected]'], | ||
impl_status_chrome=5, blink_components=['Blink'], | ||
impl_status_chrome=5, blink_components=['Blink'], shipping_year=2024, | ||
spec_link='https://example.com/spec', | ||
sample_links=['https://example.com/samples'], | ||
screenshot_links=['https://example.com/screenshot'], | ||
|
@@ -293,6 +293,7 @@ def test_feature_entry_to_json_verbose__normal(self): | |
'unlisted': False, | ||
'api_spec': False, | ||
'enterprise_impact': ENTERPRISE_IMPACT_NONE, | ||
'shipping_year': 2024, | ||
'breaking_change': False, | ||
'is_released': True, | ||
'category': 'Web Components', | ||
|
@@ -369,7 +370,6 @@ def test_feature_entry_to_json_verbose__normal(self): | |
'non_oss_deps': None, | ||
'ongoing_constraints': None, | ||
'owner_emails': ['[email protected]'], | ||
'owner_emails': ['[email protected]'], | ||
'safari_views': 1, | ||
'search_tags': [], | ||
'security_risks': None, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.