You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/08/07 02:16:24 UTC

[GitHub] [incubator-superset] bkyryliuk opened a new pull request #10545: chore: move load examples to the fixture [WIP]

bkyryliuk opened a new pull request #10545:
URL: https://github.com/apache/incubator-superset/pull/10545


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter edited a comment on pull request #10545: chore: move load examples to the fixture [WIP]

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #10545:
URL: https://github.com/apache/incubator-superset/pull/10545#issuecomment-670648345


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=h1) Report
   > Merging [#10545](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/08358d623b4938956526df840ef9e466bf281b6a&el=desc) will **decrease** coverage by `3.99%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10545/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10545      +/-   ##
   ==========================================
   - Coverage   63.86%   59.87%   -4.00%     
   ==========================================
     Files         767      413     -354     
     Lines       36302    13431   -22871     
     Branches     3426     3428       +2     
   ==========================================
   - Hits        23186     8042   -15144     
   + Misses      13003     5196    -7807     
   - Partials      113      193      +80     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `59.87% <ø> (-0.02%)` | :arrow_down: |
   | #python | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupFormatters.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwRm9ybWF0dGVycy5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupPluginsExtra.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwUGx1Z2luc0V4dHJhLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [496 more](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=footer). Last update [08358d6...53ddf2c](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bkyryliuk commented on a change in pull request #10545: chore: move load examples to the fixture [WIP]

Posted by GitBox <gi...@apache.org>.
bkyryliuk commented on a change in pull request #10545:
URL: https://github.com/apache/incubator-superset/pull/10545#discussion_r467339686



##########
File path: tests/core_tests.py
##########
@@ -361,8 +361,8 @@ def test_add_slice(self):
         self.assertEqual(resp.status_code, 200)
 
     def test_get_user_slices_for_owners(self):
-        self.login(username="admin")
-        user = security_manager.find_user("admin")
+        self.login(username="alpha")

Review comment:
       some side effects from other tests: admin has some slices




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter commented on pull request #10545: chore: move load examples to the fixture [WIP]

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #10545:
URL: https://github.com/apache/incubator-superset/pull/10545#issuecomment-670648345


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=h1) Report
   > Merging [#10545](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/08358d623b4938956526df840ef9e466bf281b6a&el=desc) will **decrease** coverage by `3.99%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10545/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10545      +/-   ##
   ==========================================
   - Coverage   63.86%   59.87%   -4.00%     
   ==========================================
     Files         767      413     -354     
     Lines       36302    13430   -22872     
     Branches     3426     3427       +1     
   ==========================================
   - Hits        23186     8041   -15145     
   + Misses      13003     5196    -7807     
   - Partials      113      193      +80     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `59.87% <ø> (-0.02%)` | :arrow_down: |
   | #python | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupFormatters.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwRm9ybWF0dGVycy5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/setup/setupPluginsExtra.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwUGx1Z2luc0V4dHJhLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [496 more](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=footer). Last update [08358d6...31230f8](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bkyryliuk merged pull request #10545: chore: move load examples to the fixture

Posted by GitBox <gi...@apache.org>.
bkyryliuk merged pull request #10545:
URL: https://github.com/apache/incubator-superset/pull/10545


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-commenter edited a comment on pull request #10545: chore: move load examples to the fixture [WIP]

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #10545:
URL: https://github.com/apache/incubator-superset/pull/10545#issuecomment-670648345


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=h1) Report
   > Merging [#10545](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3b0676f9919c8d0b18cea0c51d5241e5a6a3f9cc&el=desc) will **increase** coverage by `0.39%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10545/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10545      +/-   ##
   ==========================================
   + Coverage   59.31%   59.70%   +0.39%     
   ==========================================
     Files         354      767     +413     
     Lines       22867    36298   +13431     
     Branches        0     3428    +3428     
   ==========================================
   + Hits        13563    21673    +8110     
   - Misses       9304    14432    +5128     
   - Partials        0      193     +193     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #javascript | `59.87% <ø> (?)` | |
   | #python | `59.60% <ø> (+0.29%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/security/manager.py](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc2VjdXJpdHkvbWFuYWdlci5weQ==) | `90.00% <0.00%> (-0.65%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/components/Dashboard.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0Rhc2hib2FyZC5qc3g=) | `78.82% <0.00%> (ø)` | |
   | [...rontend/src/dashboard/components/dnd/handleDrop.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2RuZC9oYW5kbGVEcm9wLmpz) | `0.00% <0.00%> (ø)` | |
   | [...set-frontend/src/dashboard/util/getDashboardUrl.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldERhc2hib2FyZFVybC5qcw==) | `100.00% <0.00%> (ø)` | |
   | [...set-frontend/src/dashboard/util/getDropPosition.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldERyb3BQb3NpdGlvbi5qcw==) | `82.53% <0.00%> (ø)` | |
   | [superset-frontend/src/featureFlags.ts](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZlYXR1cmVGbGFncy50cw==) | `84.61% <0.00%> (ø)` | |
   | [...perset-frontend/src/utils/DebouncedMessageQueue.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL0RlYm91bmNlZE1lc3NhZ2VRdWV1ZS5qcw==) | `77.77% <0.00%> (ø)` | |
   | [...d/src/explore/components/MetricDefinitionValue.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9NZXRyaWNEZWZpbml0aW9uVmFsdWUuanN4) | `87.50% <0.00%> (ø)` | |
   | [superset-frontend/src/showSavedQuery/utils.js](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Nob3dTYXZlZFF1ZXJ5L3V0aWxzLmpz) | `100.00% <0.00%> (ø)` | |
   | [...c/dashboard/components/dnd/AddSliceDragPreview.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2RuZC9BZGRTbGljZURyYWdQcmV2aWV3LmpzeA==) | `35.71% <0.00%> (ø)` | |
   | ... and [413 more](https://codecov.io/gh/apache/incubator-superset/pull/10545/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=footer). Last update [3b0676f...f9f0dab](https://codecov.io/gh/apache/incubator-superset/pull/10545?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] villebro commented on a change in pull request #10545: chore: move load examples to the fixture

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #10545:
URL: https://github.com/apache/incubator-superset/pull/10545#discussion_r467693634



##########
File path: tests/celery_tests.py
##########
@@ -219,33 +219,33 @@ def test_run_sync_query_cta_no_data(self):
         query3 = self.get_query_by_id(result3["query"]["serverId"])
         self.assertEqual(QueryStatus.SUCCESS, query3.status)
 
-    def drop_table_if_exists(self, table_name, table_type: CtasMethod, database=None):
+    def drop_table_if_exists(
+        self, table_name, table_type: CtasMethod, database=None

Review comment:
       nit: I know we're far from mypy compliant on our tests, but I try to introduce types here whenever touching these files.
   ```suggestion
           self, table_name: str, table_type: CtasMethod, database: Optional[Database] = None
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] john-bodley commented on a change in pull request #10545: chore: move load examples to the fixture

Posted by GitBox <gi...@apache.org>.
john-bodley commented on a change in pull request #10545:
URL: https://github.com/apache/incubator-superset/pull/10545#discussion_r467692482



##########
File path: scripts/python_tests.sh
##########
@@ -23,5 +23,6 @@ echo "Superset config module: $SUPERSET_CONFIG"
 
 superset db upgrade
 superset init
-pytest --maxfail=1 tests/load_examples_test.py
-pytest --maxfail=1 --cov=superset --ignore=load_examples_test tests/*
+
+echo "Running tests"
+pytest --maxfail=1 --cov=superset tests/*

Review comment:
       Do we even need the `tests/*` argument?

##########
File path: tests/celery_tests.py
##########
@@ -219,33 +219,33 @@ def test_run_sync_query_cta_no_data(self):
         query3 = self.get_query_by_id(result3["query"]["serverId"])
         self.assertEqual(QueryStatus.SUCCESS, query3.status)
 
-    def drop_table_if_exists(self, table_name, table_type: CtasMethod, database=None):
+    def drop_table_if_exists(
+        self, table_name, table_type: CtasMethod, database=None
+    ) -> None:
         """Drop table if it exists, works on any DB"""
-        sql = f"DROP {table_type} {table_name}"
-        db_id = database.id
-        if database:
-            database.allow_dml = True
-            db.session.flush()
-        return self.run_sql(db_id, sql)
+        sql = f"DROP {table_type} IF EXISTS  {table_name}"
+        database.get_sqla_engine().execute(sql)
 
     @parameterized.expand([CtasMethod.TABLE, CtasMethod.VIEW])
     def test_run_sync_query_cta_config(self, ctas_method):
         with mock.patch(
             "superset.views.core.get_cta_schema_name",
             lambda d, u, s, sql: CTAS_SCHEMA_NAME,
         ):
-            main_db = get_example_database()
-            db_id = main_db.id
-            backend = main_db.backend
+            examples_db = get_example_database()

Review comment:
       👍 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bkyryliuk commented on a change in pull request #10545: chore: move load examples to the fixture [WIP]

Posted by GitBox <gi...@apache.org>.
bkyryliuk commented on a change in pull request #10545:
URL: https://github.com/apache/incubator-superset/pull/10545#discussion_r467339739



##########
File path: tests/datasets/api_tests.py
##########
@@ -143,21 +152,22 @@ def test_get_dataset_item(self):
             "cache_timeout": None,
             "database": {"database_name": "examples", "id": 1},
             "default_endpoint": None,
-            "description": None,
+            "description": "Energy consumption",

Review comment:
       side effect from datasource tests, changed this test to used `energy_usage` table that is not modified




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bkyryliuk commented on a change in pull request #10545: chore: move load examples to the fixture [WIP]

Posted by GitBox <gi...@apache.org>.
bkyryliuk commented on a change in pull request #10545:
URL: https://github.com/apache/incubator-superset/pull/10545#discussion_r467339769



##########
File path: tests/schedules_test.py
##########
@@ -65,7 +65,7 @@ def setUpClass(cls):
             slce = db.session.query(Slice).filter_by(slice_name="Participants").one()
             dashboard = (
                 db.session.query(Dashboard)
-                .filter_by(dashboard_title="USA Births Names")
+                .filter_by(dashboard_title="World Bank's Data")

Review comment:
       `USA Births Names` was not found




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org