def test_state_with_overlap(): """If theres overlap between state and kwargs, state takes precedence.""" assert full_options({ "a": 3, "d": 4 }, { "a": 1, "b": 2 }) == { "a": 3, "b": 2, "d": 4 }
def test_state_with_overlap(): "If theres overlap between state and kwargs, state takes precedence." assert full_options({ 'a': 3, 'd': 4 }, { 'a': 1, 'b': 2 }) == { 'a': 3, 'b': 2, 'd': 4 }
def test_state(): """If there's state, it is added to kwargs.""" assert full_options({ "c": 3, "d": 4 }, { "a": 1, "b": 2 }) == { "a": 1, "b": 2, "c": 3, "d": 4, }
def test_state(): "If there's state, it is added to kwargs" assert full_options({ 'c': 3, 'd': 4 }, { 'a': 1, 'b': 2 }) == { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
def publish_app(self, app, channel, **kwargs): self.actions.append(('publish', app.app_name, channel, kwargs)) return full_options({ 'publish_state': app.app_name }, kwargs)
def run_dev_app(self, app, env, **kwargs): self.actions.append(("run_dev", app.app_name, kwargs, env)) return full_options({ "run_dev_state": app.app_name, "env": env }, kwargs)
def package_app(self, app, **kwargs): self.actions.append(('package', app.app_name, kwargs)) return full_options({'package_state': app.app_name}, kwargs)
def create_command(self, app, **kwargs): self.actions.append(("create", app.app_name, kwargs)) return full_options({"create_state": app.app_name}, kwargs)
def run_app(self, app, **kwargs): self.actions.append(('run', app.app_name, kwargs)) return full_options({ 'run_state': app.app_name }, kwargs)
def package_app(self, app, **kwargs): self.actions.append(("package", app.app_name, kwargs)) return full_options({"package_state": app.app_name}, kwargs)
def new_app(self, **kwargs): self.actions.append(('new', kwargs)) return full_options({'new_state': 'done'}, kwargs)
def test_no_state(): "If there's no state, just kwargs are returned" assert full_options(None, {'a': 1, 'b': 2}) == {'a': 1, 'b': 2}
def new_app(self, **kwargs): self.actions.append(("new", kwargs)) return full_options({"new_state": "done"}, kwargs)
def update_command(self, app, **kwargs): self.actions.append(('update', app.app_name, kwargs)) return full_options({ 'update_state': app.app_name }, kwargs)
def test_no_state(): """If there's no state, just kwargs are returned.""" assert full_options(None, {"a": 1, "b": 2}) == {"a": 1, "b": 2}
def build_command(self, app, **kwargs): self.actions.append(('build', app.app_name, kwargs)) return full_options({ 'build_state': app.app_name }, kwargs)
def run_app(self, app, **kwargs): self.actions.append(("run", app.app_name, kwargs)) return full_options({"run_state": app.app_name}, kwargs)