ofekisr opened a new pull request #17407:
URL: https://github.com/apache/superset/pull/17407


   ## **Background** 
   When we have worked on #16991 we wanted to test the new functionalities in 
concrete and accurate unittest.
   The whole the chartData flows and its components are too couple to superset 
so it is impossible to create unittests. 
   The flows are not testable and so many components do not meet the very 
important principle SRP and the code became so dirty 
   
   So I've started to refactor it (#17344 ) but many changes were added and it 
was hard to review so I decided to split those changes into small PRs so will 
be easier to follow 
   
   this is the forth PR in a sequence of PRs to meet these
   
   ## PR description
   In #17400, ChartData endpoints were moved to a new view, so the tests should 
move too. 
   
   What else?
   1. Improve tests setup - it doesn't sense each test will do the same setup 
instead in one place, 
   2. improve get_query_contexe setup - it doesn't sense that each test will 
force call the database over and over. so now it will call the DB one time and 
create a query context template. Then each test will copy the query context 
template. 
   4. Advance another one step further into using pytest without unittest 
coupling 
   5. improve test cases names so it will be clear what the test is done and 
expected. 
   
   ### Test plans 
   should we test the tests? :) 
   
   
   ## Previous PRs
   1. #17399
   2. #17400 
   3. #17405 
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to