On Mon, Oct 30, 2023 at 12:51 PM Alassane Yattara <
[email protected]> wrote:

> Remove load and create build environment from
> tests/functional/functional_helpers
>
> We really need some explanation of why here. This seems like it is
crippling the whole purpose of Toaster and hence the tests: running builds.

If another commit is adding a different way of accomplishing the same
thing, then that should be documented here.

Can we not mark the class with @pytest.mark.django_db?
" Remember that you can apply marks at the single test level, the class
level, the module level, and dynamically in a hook or fixture."
https://pytest-django.readthedocs.io/en/latest/helpers.html#markers

If this code is really not needed, then an explanation of why it is not
needed should be provided.



> Signed-off-by: Alassane Yattara <[email protected]>
> ---
>  lib/toaster/tests/functional/functional_helpers.py | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/lib/toaster/tests/functional/functional_helpers.py
> b/lib/toaster/tests/functional/functional_helpers.py
> index c3191f66..b80d403b 100644
> --- a/lib/toaster/tests/functional/functional_helpers.py
> +++ b/lib/toaster/tests/functional/functional_helpers.py
> @@ -15,8 +15,6 @@ import time
>  import re
>
>  from tests.browser.selenium_helpers_base import SeleniumTestCaseBase
> -from tests.builds.buildtest import load_build_environment
> -from bldcontrol.models import BuildEnvironment
>  from selenium.webdriver.common.by import By
>  from selenium.common.exceptions import NoSuchElementException
>
> @@ -33,10 +31,6 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase):
>              raise RuntimeError("Please initialise django with the tests
> settings:  " \
>                  "DJANGO_SETTINGS_MODULE='toastermain.settings_test'")
>
> -        if BuildEnvironment.objects.count() == 0:
> -
> BuildEnvironment.objects.create(betype=BuildEnvironment.TYPE_LOCAL)
> -        load_build_environment()
> -
>          # start toaster
>          cmd = "bash -c 'source toaster start'"
>          p = subprocess.Popen(
> --
> 2.34.1
>
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5919): https://lists.yoctoproject.org/g/toaster/message/5919
Mute This Topic: https://lists.yoctoproject.org/mt/102298387/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/toaster/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to