Skip to content

Commit

Permalink
Merge pull request #1512 from dmach/fix-SimpleFlag
Browse files Browse the repository at this point in the history
Fix TypeError: SimpleFlag.__init__() got an unexpected keyword argument '_apiurl'
  • Loading branch information
dmach committed Mar 11, 2024
2 parents ce1855f + 40807ec commit ad4d6fa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
13 changes: 13 additions & 0 deletions behave/features/build.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Feature: `osc build` command


# common steps for all scenarios
Background:
Given I set working directory to "{context.osc.temp}"
And I execute osc with args "co test:factory/test-pkgA"
And I set working directory to "{context.osc.temp}/test:factory/test-pkgA"


Scenario: Run `osc build --just-print-buildroot`
When I execute osc with args "build --just-print-buildroot"
Then the exit code is 0
4 changes: 4 additions & 0 deletions behave/fixtures/prj/test_factory.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

<person userid="Admin" role="maintainer"/>

<lock>
<disable/>
</lock>

<build>
<disable/>
</build>
Expand Down
4 changes: 2 additions & 2 deletions osc/obs_api/simple_flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ class SimpleFlag(XmlModel):
XML_TAG = None
XML_TAG_FIELD = "flag"

def __init__(self, flag):
super().__init__(flag=flag)
def __init__(self, flag, **kwargs):
super().__init__(flag=flag, **kwargs)

class SimpleFlagChoices(Enum):
ENABLE = "enable"
Expand Down

0 comments on commit ad4d6fa

Please sign in to comment.