# DictSubject {.starlark-object} ## DictSubject.contains_at_least {.starlark-signature} DictSubject.contains_at_least([at_least](#dictsubject_contains_at_least_at_least)) Assert the dict has at least the entries from `at_least`. Method: DictSubject.contains_at_least {#dictsubject_contains_at_least_parameters} **PARAMETERS** [¶](#dictsubject_contains_at_least_parameters){.headerlink} :[at_least[¶](#dictsubject_contains_at_least_at_least){.headerlink}]{.span}: []{#dictsubject_contains_at_least_at_least} ([`dict`]) the subset of keys/values that must exist. Extra keys are allowed. Order is not checked. {.starlark-object} ## DictSubject.contains_exactly {.starlark-signature} DictSubject.contains_exactly([expected](#dictsubject_contains_exactly_expected)) Assert the dict has exactly the provided values. Method: DictSubject.contains_exactly {#dictsubject_contains_exactly_parameters} **PARAMETERS** [¶](#dictsubject_contains_exactly_parameters){.headerlink} :[expected[¶](#dictsubject_contains_exactly_expected){.headerlink}]{.span}: []{#dictsubject_contains_exactly_expected} ([`dict`]) the values that must exist. Missing values or extra values are not allowed. Order is not checked. {.starlark-object} ## DictSubject.contains_none_of {.starlark-signature} DictSubject.contains_none_of([none_of](#dictsubject_contains_none_of_none_of)) Assert the dict contains none of `none_of` keys/values. Method: DictSubject.contains_none_of {#dictsubject_contains_none_of_parameters} **PARAMETERS** [¶](#dictsubject_contains_none_of_parameters){.headerlink} :[none_of[¶](#dictsubject_contains_none_of_none_of){.headerlink}]{.span}: []{#dictsubject_contains_none_of_none_of} ([`dict`]) the keys/values that must not exist. Order is not checked. {.starlark-object} ## DictSubject.keys {.starlark-signature} DictSubject.keys() Returns a `CollectionSubject` for the dict's keys. Method: DictSubject.keys {#dictsubject_keys_returns} RETURNS [¶](#dictsubject_keys_returns){.headerlink} : [`CollectionSubject`] of the keys. {.starlark-object} ## DictSubject.new {.starlark-signature} DictSubject.new([actual](#dictsubject_new_actual), [meta](#dictsubject_new_meta), [container_name](#dictsubject_new_container_name)="dict", [key_plural_name](#dictsubject_new_key_plural_name)="keys") Creates a new `DictSubject`. Method: DictSubject.new {#dictsubject_new_parameters} **PARAMETERS** [¶](#dictsubject_new_parameters){.headerlink} {.params-box} :[actual[¶](#dictsubject_new_actual){.headerlink}]{.span}: []{#dictsubject_new_actual} ([`dict`]) the dict to assert against. :[meta[¶](#dictsubject_new_meta){.headerlink}]{.span}: []{#dictsubject_new_meta} ([`ExpectMeta`]) of call chain information. :[container_name[¶](#dictsubject_new_container_name){.headerlink}]{.span}: []{#dictsubject_new_container_name} (_default `"dict"`_) ([`str`]) conceptual name of the dict. :[key_plural_name[¶](#dictsubject_new_key_plural_name){.headerlink}]{.span}: []{#dictsubject_new_key_plural_name} (_default `"keys"`_) ([`str`]) the plural word for the keys of the dict. {#dictsubject_new_returns} RETURNS [¶](#dictsubject_new_returns){.headerlink} : New `DictSubject` struct. [`Action`]: https://bazel.build/rules/lib/Action [`ActionSubject`]: /api/action_subject [`bool`]: https://bazel.build/rules/lib/bool [`BoolSubject`]: /api/bool_subject [`CollectionSubject`]: /api/collection_subject [`depset`]: https://bazel.build/rules/lib/depset [`DepsetFileSubject`]: /api/depset_file_subject [`dict`]: https://bazel.build/rules/lib/dict [`DictSubject`]: /api/dict_subject [`Expect`]: /api/expect [`ExpectMeta`]: /api/expect_meta [`File`]: https://bazel.build/rules/lib/File [`FileSubject`]: /api/file_subject [`format_str`]: /api/expect_meta.html#expectmeta-format-str [`IntSubject`]: /api/int_subject [`Label`]: https://bazel.build/rules/lib/Label [`LabelSubject`]: /api/label_subject [`list`]: https://bazel.build/rules/lib/list [`Ordered`]: /api/ordered [`RunfilesSubject`]: /api/runfiles_subject [`str`]: https://bazel.build/rules/lib/string [`struct`]: https://bazel.build/rules/lib/builtins/struct [`StrSubject`]: /api/str_subject [`StructSubject`]: /api/struct_subject [`Target`]: https://bazel.build/rules/lib/Target [`TargetSubject`]: /api/target_subject [target-name]: https://bazel.build/concepts/labels#target-names [attr-label]: https://bazel.build/concepts/labels