summaryrefslogtreecommitdiff
path: root/lib/subunit/python/testtools/content_type.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-03-31 03:19:18 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-03-31 03:19:18 +0200
commita8ac7fda573a924debf165d39eff3c1837240d4f (patch)
tree6085df961a5fbcc57a240d7065d2fc4a258cf170 /lib/subunit/python/testtools/content_type.py
parente4af3afd7ae3e39218b42a42d39c2ec10be9a642 (diff)
downloadsamba-a8ac7fda573a924debf165d39eff3c1837240d4f.tar.gz
samba-a8ac7fda573a924debf165d39eff3c1837240d4f.tar.bz2
samba-a8ac7fda573a924debf165d39eff3c1837240d4f.zip
Put testtools directly under lib/ to make it easier to install from Samba 4.
Diffstat (limited to 'lib/subunit/python/testtools/content_type.py')
-rw-r--r--lib/subunit/python/testtools/content_type.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/subunit/python/testtools/content_type.py b/lib/subunit/python/testtools/content_type.py
deleted file mode 100644
index aded81b732..0000000000
--- a/lib/subunit/python/testtools/content_type.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (c) 2009 Jonathan M. Lange. See LICENSE for details.
-
-"""ContentType - a MIME Content Type."""
-
-
-class ContentType(object):
- """A content type from http://www.iana.org/assignments/media-types/
-
- :ivar type: The primary type, e.g. "text" or "application"
- :ivar subtype: The subtype, e.g. "plain" or "octet-stream"
- :ivar parameters: A dict of additional parameters specific to the
- content type.
- """
-
- def __init__(self, primary_type, sub_type, parameters=None):
- """Create a ContentType."""
- if None in (primary_type, sub_type):
- raise ValueError("None not permitted in %r, %r" % (
- primary_type, sub_type))
- self.type = primary_type
- self.subtype = sub_type
- self.parameters = parameters or {}
-
- def __eq__(self, other):
- if type(other) != ContentType:
- return False
- return self.__dict__ == other.__dict__
-
- def __repr__(self):
- return "%s/%s params=%s" % (self.type, self.subtype, self.parameters)